diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-19 07:42:09 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-19 07:42:09 +0000 |
commit | f9ae6f95055fe8521d46b1f2d87f7062d9977104 (patch) | |
tree | ae798e9ef20864aa44736ca475453536bd92e00f /gcc/config | |
parent | dd76621fd65db1958572949115035a8c3646d846 (diff) | |
download | gcc-f9ae6f95055fe8521d46b1f2d87f7062d9977104.tar.gz |
Remove tree_to_hwi.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@205007 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/avr/avr.c | 4 | ||||
-rw-r--r-- | gcc/config/epiphany/epiphany.c | 2 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 4 | ||||
-rw-r--r-- | gcc/config/m32c/m32c.c | 6 | ||||
-rw-r--r-- | gcc/config/mep/mep.c | 6 | ||||
-rw-r--r-- | gcc/config/msp430/msp430.c | 2 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 22 | ||||
-rw-r--r-- | gcc/config/sh/sh.c | 6 | ||||
-rw-r--r-- | gcc/config/sol2-c.c | 2 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.c | 18 | ||||
-rw-r--r-- | gcc/config/vms/vms-c.c | 2 |
11 files changed, 37 insertions, 37 deletions
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index e83624087b2..f0383a7b314 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -12072,7 +12072,7 @@ avr_expand_builtin (tree exp, rtx target, if (TREE_CODE (CALL_EXPR_ARG (exp, 1)) != INTEGER_CST) break; - int rbit = (int) tree_to_hwi (CALL_EXPR_ARG (exp, 1)); + int rbit = (int) TREE_INT_CST_LOW (CALL_EXPR_ARG (exp, 1)); if (rbit >= (int) GET_MODE_FBIT (mode)) { @@ -12256,7 +12256,7 @@ avr_fold_builtin (tree fndecl, int n_args ATTRIBUTE_UNUSED, tree *arg, /* Inserting bits known at compile time is easy and can be performed by AND and OR with appropriate masks. */ - int bits = tree_to_hwi (tbits); + int bits = TREE_INT_CST_LOW (tbits); int mask_ior = 0, mask_and = 0xff; for (i = 0; i < 8; i++) diff --git a/gcc/config/epiphany/epiphany.c b/gcc/config/epiphany/epiphany.c index f07f15e888c..c3200250c06 100644 --- a/gcc/config/epiphany/epiphany.c +++ b/gcc/config/epiphany/epiphany.c @@ -2762,7 +2762,7 @@ epiphany_special_round_type_align (tree type, unsigned computed, || tree_to_uhwi (offset) >= try_align || tree_to_uhwi (size) >= try_align) return try_align; - total = tree_to_hwi (offset) + tree_to_hwi (size); + total = TREE_INT_CST_LOW (offset) + TREE_INT_CST_LOW (size); if (total > max) max = total; } diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 113367c8607..d332b5bc80e 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -5475,7 +5475,7 @@ ix86_function_regparm (const_tree type, const_tree decl) attr = lookup_attribute ("regparm", TYPE_ATTRIBUTES (type)); if (attr) { - regparm = tree_to_hwi (TREE_VALUE (TREE_VALUE (attr))); + regparm = TREE_INT_CST_LOW (TREE_VALUE (TREE_VALUE (attr))); return regparm; } } @@ -5602,7 +5602,7 @@ ix86_keep_aggregate_return_pointer (tree fntype) attr = lookup_attribute ("callee_pop_aggregate_return", TYPE_ATTRIBUTES (fntype)); if (attr) - return (tree_to_hwi (TREE_VALUE (TREE_VALUE (attr))) == 0); + return (TREE_INT_CST_LOW (TREE_VALUE (TREE_VALUE (attr))) == 0); /* For 32-bit MS-ABI the default is to keep aggregate return pointer. */ diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c index f78037446fd..deac40c228f 100644 --- a/gcc/config/m32c/m32c.c +++ b/gcc/config/m32c/m32c.c @@ -2935,8 +2935,8 @@ function_vector_handler (tree * node ATTRIBUTE_UNUSED, name); *no_add_attrs = true; } - else if (tree_to_hwi (TREE_VALUE (args)) < 18 - || tree_to_hwi (TREE_VALUE (args)) > 255) + else if (TREE_INT_CST_LOW (TREE_VALUE (args)) < 18 + || TREE_INT_CST_LOW (TREE_VALUE (args)) > 255) { /* The argument value must be between 18 to 255. */ warning (OPT_Wattributes, @@ -2968,7 +2968,7 @@ current_function_special_page_vector (rtx x) { if (is_attribute_p ("function_vector", TREE_PURPOSE (list))) { - num = tree_to_hwi (TREE_VALUE (TREE_VALUE (list))); + num = TREE_INT_CST_LOW (TREE_VALUE (TREE_VALUE (list))); return num; } diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c index 4f986ed8b5e..489bef9c2d3 100644 --- a/gcc/config/mep/mep.c +++ b/gcc/config/mep/mep.c @@ -4210,7 +4210,7 @@ mep_attrlist_to_encoding (tree list, tree decl) && TREE_VALUE (TREE_VALUE (list)) && TREE_CODE (TREE_VALUE (TREE_VALUE (list))) == INTEGER_CST) { - int location = tree_to_hwi (TREE_VALUE (TREE_VALUE(list))); + int location = TREE_INT_CST_LOW (TREE_VALUE (TREE_VALUE(list))); if (location >= 0 && location <= 0x1000000) return 'i'; @@ -4299,7 +4299,7 @@ mep_insert_attributes (tree decl, tree *attributes) && TREE_VALUE (attr) && TREE_VALUE (TREE_VALUE(attr))) { - int location = tree_to_hwi (TREE_VALUE (TREE_VALUE(attr))); + int location = TREE_INT_CST_LOW (TREE_VALUE (TREE_VALUE(attr))); static tree previous_value = 0; static int previous_location = 0; static tree previous_name = 0; @@ -4715,7 +4715,7 @@ mep_output_aligned_common (FILE *stream, tree decl, const char *name, if (attr && TREE_VALUE (attr) && TREE_VALUE (TREE_VALUE(attr))) - location = tree_to_hwi (TREE_VALUE (TREE_VALUE(attr))); + location = TREE_INT_CST_LOW (TREE_VALUE (TREE_VALUE(attr))); if (location == -1) return; if (global) diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c index 6648cacb68c..8721f3a8229 100644 --- a/gcc/config/msp430/msp430.c +++ b/gcc/config/msp430/msp430.c @@ -1157,7 +1157,7 @@ msp430_start_function (FILE *file, const char *name, tree decl) TREE_STRING_POINTER (intr_vector)); else /* TREE_CODE (intr_vector) == INTEGER_CST */ sprintf (buf, "__interrupt_vector_%u", - (unsigned int) tree_to_hwi (intr_vector)); + (unsigned int) TREE_INT_CST_LOW (intr_vector)); switch_to_section (get_section (buf, SECTION_CODE, decl)); fputs ("\t.word\t", file); diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index feab5e25eb1..c530ccde536 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -4036,7 +4036,7 @@ rs6000_builtin_support_vector_misalignment (enum machine_mode mode, it's word aligned. */ if (rs6000_vector_alignment_reachable (type, is_packed)) { - int element_size = tree_to_hwi (TYPE_SIZE (type)); + int element_size = TREE_INT_CST_LOW (TYPE_SIZE (type)); if (element_size == 64 || element_size == 32) return true; @@ -11553,7 +11553,7 @@ rs6000_expand_binop_builtin (enum insn_code icode, tree exp, rtx target) /* Only allow 5-bit unsigned literals. */ STRIP_NOPS (arg1); if (TREE_CODE (arg1) != INTEGER_CST - || tree_to_hwi (arg1) & ~0x1f) + || TREE_INT_CST_LOW (arg1) & ~0x1f) { error ("argument 2 must be a 5-bit unsigned literal"); return const0_rtx; @@ -11598,7 +11598,7 @@ altivec_expand_predicate_builtin (enum insn_code icode, tree exp, rtx target) return const0_rtx; } else - cr6_form_int = tree_to_hwi (cr6_form); + cr6_form_int = TREE_INT_CST_LOW (cr6_form); gcc_assert (mode0 == mode1); @@ -12089,7 +12089,7 @@ rs6000_expand_ternop_builtin (enum insn_code icode, tree exp, rtx target) /* Only allow 4-bit unsigned literals. */ STRIP_NOPS (arg2); if (TREE_CODE (arg2) != INTEGER_CST - || tree_to_hwi (arg2) & ~0xf) + || TREE_INT_CST_LOW (arg2) & ~0xf) { error ("argument 3 must be a 4-bit unsigned literal"); return const0_rtx; @@ -12107,7 +12107,7 @@ rs6000_expand_ternop_builtin (enum insn_code icode, tree exp, rtx target) /* Only allow 2-bit unsigned literals. */ STRIP_NOPS (arg2); if (TREE_CODE (arg2) != INTEGER_CST - || tree_to_hwi (arg2) & ~0x3) + || TREE_INT_CST_LOW (arg2) & ~0x3) { error ("argument 3 must be a 2-bit unsigned literal"); return const0_rtx; @@ -12119,7 +12119,7 @@ rs6000_expand_ternop_builtin (enum insn_code icode, tree exp, rtx target) /* Only allow 1-bit unsigned literals. */ STRIP_NOPS (arg2); if (TREE_CODE (arg2) != INTEGER_CST - || tree_to_hwi (arg2) & ~0x1) + || TREE_INT_CST_LOW (arg2) & ~0x1) { error ("argument 3 must be a 1-bit unsigned literal"); return const0_rtx; @@ -12323,7 +12323,7 @@ altivec_expand_dst_builtin (tree exp, rtx target ATTRIBUTE_UNUSED, *expandedp = true; STRIP_NOPS (arg2); if (TREE_CODE (arg2) != INTEGER_CST - || tree_to_hwi (arg2) & ~0x3) + || TREE_INT_CST_LOW (arg2) & ~0x3) { error ("argument to %qs must be a 2-bit unsigned literal", d->name); return const0_rtx; @@ -12570,7 +12570,7 @@ altivec_expand_builtin (tree exp, rtx target, bool *expandedp) return const0_rtx; if (TREE_CODE (arg0) != INTEGER_CST - || tree_to_hwi (arg0) & ~0x3) + || TREE_INT_CST_LOW (arg0) & ~0x3) { error ("argument to dss must be a 2-bit unsigned literal"); return const0_rtx; @@ -12779,7 +12779,7 @@ spe_expand_builtin (tree exp, rtx target, bool *expandedp) case SPE_BUILTIN_EVSTWWO: arg1 = CALL_EXPR_ARG (exp, 2); if (TREE_CODE (arg1) != INTEGER_CST - || tree_to_hwi (arg1) & ~0x1f) + || TREE_INT_CST_LOW (arg1) & ~0x1f) { error ("argument 2 must be a 5-bit unsigned literal"); return const0_rtx; @@ -12905,7 +12905,7 @@ paired_expand_predicate_builtin (enum insn_code icode, tree exp, rtx target) return const0_rtx; } else - form_int = tree_to_hwi (form); + form_int = TREE_INT_CST_LOW (form); gcc_assert (mode0 == mode1); @@ -12977,7 +12977,7 @@ spe_expand_predicate_builtin (enum insn_code icode, tree exp, rtx target) return const0_rtx; } else - form_int = tree_to_hwi (form); + form_int = TREE_INT_CST_LOW (form); gcc_assert (mode0 == mode1); diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 0be07b86dab..088ef396313 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -1161,7 +1161,7 @@ sh_print_operand (FILE *stream, rtx x, int code) DECL_ATTRIBUTES (current_function_decl)); if (trapa_attr) fprintf (stream, "trapa #%ld", - (long) tree_to_hwi (TREE_VALUE (TREE_VALUE (trapa_attr)))); + (long) TREE_INT_CST_LOW (TREE_VALUE (TREE_VALUE (trapa_attr)))); else if (sh_cfun_interrupt_handler_p ()) { if (sh_cfun_resbank_handler_p ()) @@ -9505,7 +9505,7 @@ sh2a_handle_function_vector_handler_attribute (tree * node, tree name, name); *no_add_attrs = true; } - else if (tree_to_hwi (TREE_VALUE (args)) > 255) + else if (TREE_INT_CST_LOW (TREE_VALUE (args)) > 255) { /* The argument value must be between 0 to 255. */ warning (OPT_Wattributes, @@ -9554,7 +9554,7 @@ sh2a_get_function_vector_number (rtx x) { if (is_attribute_p ("function_vector", TREE_PURPOSE (list))) { - num = tree_to_hwi (TREE_VALUE (TREE_VALUE (list))); + num = TREE_INT_CST_LOW (TREE_VALUE (TREE_VALUE (list))); return num; } diff --git a/gcc/config/sol2-c.c b/gcc/config/sol2-c.c index 86a8d907521..0accac40020 100644 --- a/gcc/config/sol2-c.c +++ b/gcc/config/sol2-c.c @@ -93,7 +93,7 @@ solaris_pragma_align (cpp_reader *pfile ATTRIBUTE_UNUSED) return; } - low = tree_to_hwi (x); + low = TREE_INT_CST_LOW (x); if (!cst_fits_uhwi_p (x) || (low != 1 && low != 2 && low != 4 && low != 8 && low != 16 && low != 32 && low != 64 && low != 128)) diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index f4508021de3..ab8f501e4fa 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -7148,10 +7148,10 @@ sparc_struct_value_rtx (tree fndecl, int incoming) /* Calculate the return object size */ tree size = TYPE_SIZE_UNIT (TREE_TYPE (fndecl)); - rtx size_rtx = GEN_INT (tree_to_hwi (size) & 0xfff); + rtx size_rtx = GEN_INT (TREE_INT_CST_LOW (size) & 0xfff); /* Construct a temporary return value */ rtx temp_val - = assign_stack_local (Pmode, tree_to_hwi (size), 0); + = assign_stack_local (Pmode, TREE_INT_CST_LOW (size), 0); /* Implement SPARC 32-bit psABI callee return struct checking: @@ -10500,31 +10500,31 @@ sparc_handle_vis_mul8x16 (tree *n_elts, int fncode, tree inner_type, for (i = 0; i < num; ++i) { int val - = sparc_vis_mul8x16 (tree_to_hwi (VECTOR_CST_ELT (cst0, i)), - tree_to_hwi (VECTOR_CST_ELT (cst1, i))); + = sparc_vis_mul8x16 (TREE_INT_CST_LOW (VECTOR_CST_ELT (cst0, i)), + TREE_INT_CST_LOW (VECTOR_CST_ELT (cst1, i))); n_elts[i] = build_int_cst (inner_type, val); } break; case CODE_FOR_fmul8x16au_vis: - scale = tree_to_hwi (VECTOR_CST_ELT (cst1, 0)); + scale = TREE_INT_CST_LOW (VECTOR_CST_ELT (cst1, 0)); for (i = 0; i < num; ++i) { int val - = sparc_vis_mul8x16 (tree_to_hwi (VECTOR_CST_ELT (cst0, i)), + = sparc_vis_mul8x16 (TREE_INT_CST_LOW (VECTOR_CST_ELT (cst0, i)), scale); n_elts[i] = build_int_cst (inner_type, val); } break; case CODE_FOR_fmul8x16al_vis: - scale = tree_to_hwi (VECTOR_CST_ELT (cst1, 1)); + scale = TREE_INT_CST_LOW (VECTOR_CST_ELT (cst1, 1)); for (i = 0; i < num; ++i) { int val - = sparc_vis_mul8x16 (tree_to_hwi (VECTOR_CST_ELT (cst0, i)), + = sparc_vis_mul8x16 (TREE_INT_CST_LOW (VECTOR_CST_ELT (cst0, i)), scale); n_elts[i] = build_int_cst (inner_type, val); } @@ -10584,7 +10584,7 @@ sparc_fold_builtin (tree fndecl, int n_args ATTRIBUTE_UNUSED, n_elts = XALLOCAVEC (tree, VECTOR_CST_NELTS (arg0)); for (i = 0; i < VECTOR_CST_NELTS (arg0); ++i) n_elts[i] = build_int_cst (inner_type, - tree_to_hwi + TREE_INT_CST_LOW (VECTOR_CST_ELT (arg0, i)) << 4); return build_vector (rtype, n_elts); } diff --git a/gcc/config/vms/vms-c.c b/gcc/config/vms/vms-c.c index 5e4ed7cca65..d56ac1b8a70 100644 --- a/gcc/config/vms/vms-c.c +++ b/gcc/config/vms/vms-c.c @@ -316,7 +316,7 @@ handle_pragma_pointer_size (const char *pragma_name) int val; if (TREE_CODE (x) == INTEGER_CST) - val = tree_to_hwi (x); + val = TREE_INT_CST_LOW (x); else val = -1; |