diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-04 12:54:49 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-04 12:54:49 +0000 |
commit | bdff91a14bf8e5d18b1eb47bb529894482065762 (patch) | |
tree | 4515b21fe5d3e25b4d5c8f907d3e78834e1e40ac /gcc/builtins.c | |
parent | 0158370253d4aef042c4d67b2c0278ded58d83fd (diff) | |
parent | 8192796762b4781de57ce2a6c104a71dcbd874e3 (diff) | |
download | gcc-bdff91a14bf8e5d18b1eb47bb529894482065762.tar.gz |
Merge with trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@205668 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 70 |
1 files changed, 9 insertions, 61 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index ddca5471810..91a6beab89d 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -30,6 +30,11 @@ along with GCC; see the file COPYING3. If not see #include "varasm.h" #include "tree-object-size.h" #include "realmpfr.h" +#include "basic-block.h" +#include "tree-ssa-alias.h" +#include "internal-fn.h" +#include "gimple-expr.h" +#include "is-a.h" #include "gimple.h" #include "flags.h" #include "regs.h" @@ -47,7 +52,6 @@ along with GCC; see the file COPYING3. If not see #include "tm_p.h" #include "target.h" #include "langhooks.h" -#include "basic-block.h" #include "tree-ssanames.h" #include "tree-dfa.h" #include "value-prof.h" @@ -588,7 +592,7 @@ c_strlen (tree src, int only_value) && (only_value || !TREE_SIDE_EFFECTS (TREE_OPERAND (src, 0)))) return c_strlen (TREE_OPERAND (src, 1), only_value); - loc = EXPR_LOC_OR_HERE (src); + loc = EXPR_LOC_OR_LOC (src, input_location); src = string_constant (src, &offset_node); if (src == 0) @@ -3149,7 +3153,7 @@ determine_block_size (tree len, rtx len_rtx, } else if (range_type == VR_ANTI_RANGE) { - /* Anti range 0...N lets us to determine minmal size to N+1. */ + /* Anti range 0...N lets us to determine minimal size to N+1. */ if (min == 0) { if (wi::fits_uhwi_p (max) && max.to_uhwi () + 1 != 0) @@ -3159,7 +3163,7 @@ determine_block_size (tree len, rtx len_rtx, int n; if (n < 100) - memcpy (a,b, n) + memcpy (a, b, n) Produce anti range allowing negative values of N. We still can use the information and make a guess that N is not negative. @@ -5789,18 +5793,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, && fcode != BUILT_IN_EXECVE && fcode != BUILT_IN_ALLOCA && fcode != BUILT_IN_ALLOCA_WITH_ALIGN - && fcode != BUILT_IN_FREE - && fcode != BUILT_IN_CHKP_SET_PTR_BOUNDS - && fcode != BUILT_IN_CHKP_INIT_PTR_BOUNDS - && fcode != BUILT_IN_CHKP_NULL_PTR_BOUNDS - && fcode != BUILT_IN_CHKP_COPY_PTR_BOUNDS - && fcode != BUILT_IN_CHKP_NARROW_PTR_BOUNDS - && fcode != BUILT_IN_CHKP_STORE_PTR_BOUNDS - && fcode != BUILT_IN_CHKP_CHECK_PTR_LBOUNDS - && fcode != BUILT_IN_CHKP_CHECK_PTR_UBOUNDS - && fcode != BUILT_IN_CHKP_CHECK_PTR_BOUNDS - && fcode != BUILT_IN_CHKP_GET_PTR_LBOUND - && fcode != BUILT_IN_CHKP_GET_PTR_UBOUND) + && fcode != BUILT_IN_FREE) return expand_call (exp, target, ignore); /* The built-in function expanders test for target == const0_rtx @@ -6852,51 +6845,6 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, expand_builtin_cilk_pop_frame (exp); return const0_rtx; - case BUILT_IN_CHKP_INIT_PTR_BOUNDS: - case BUILT_IN_CHKP_NULL_PTR_BOUNDS: - case BUILT_IN_CHKP_COPY_PTR_BOUNDS: - return expand_normal (CALL_EXPR_ARG (exp, 0)); - - case BUILT_IN_CHKP_CHECK_PTR_LBOUNDS: - case BUILT_IN_CHKP_CHECK_PTR_UBOUNDS: - case BUILT_IN_CHKP_CHECK_PTR_BOUNDS: - case BUILT_IN_CHKP_SET_PTR_BOUNDS: - case BUILT_IN_CHKP_NARROW_PTR_BOUNDS: - case BUILT_IN_CHKP_STORE_PTR_BOUNDS: - case BUILT_IN_CHKP_GET_PTR_LBOUND: - case BUILT_IN_CHKP_GET_PTR_UBOUND: - /* We allow user CHKP builtins if Pointer Bounds - Checker is off. */ - if (!flag_check_pointer_bounds) - { - if (fcode == BUILT_IN_CHKP_SET_PTR_BOUNDS - || fcode == BUILT_IN_CHKP_NARROW_PTR_BOUNDS) - return expand_normal (CALL_EXPR_ARG (exp, 0)); - else if (fcode == BUILT_IN_CHKP_GET_PTR_LBOUND) - return expand_normal (size_zero_node); - else if (fcode == BUILT_IN_CHKP_GET_PTR_UBOUND) - return expand_normal (size_int (-1)); - else - return const0_rtx; - } - /* FALLTHROUGH */ - - case BUILT_IN_CHKP_BNDMK: - case BUILT_IN_CHKP_BNDSTX: - case BUILT_IN_CHKP_BNDCL: - case BUILT_IN_CHKP_BNDCU: - case BUILT_IN_CHKP_BNDLDX: - case BUILT_IN_CHKP_BNDRET: - case BUILT_IN_CHKP_INTERSECT: - case BUILT_IN_CHKP_ARG_BND: - case BUILT_IN_CHKP_NARROW: - case BUILT_IN_CHKP_EXTRACT_LOWER: - case BUILT_IN_CHKP_EXTRACT_UPPER: - /* Software implementation of pointers checker is NYI. - Target support is required. */ - error ("Your target platform does not support -fcheck-pointers"); - break; - default: /* just do library call, if unknown builtin */ break; } |