diff options
Diffstat (limited to 'gcc/config/iq2000/iq2000.c')
-rw-r--r-- | gcc/config/iq2000/iq2000.c | 43 |
1 files changed, 11 insertions, 32 deletions
diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c index 5661fd4..5f9049d 100644 --- a/gcc/config/iq2000/iq2000.c +++ b/gcc/config/iq2000/iq2000.c @@ -46,6 +46,7 @@ along with GCC; see the file COPYING3. If not see #include "target.h" #include "target-def.h" #include "langhooks.h" +#include "df.h" /* Enumeration for all of the relational tests, so that we can build arrays indexed by the test type, and not worry about the order @@ -1150,7 +1151,7 @@ iq2000_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode, "function_adv({gp reg found = %d, arg # = %2d, words = %2d}, %4s, ", cum->gp_reg_found, cum->arg_number, cum->arg_words, GET_MODE_NAME (mode)); - fprintf (stderr, "%p", (void *) type); + fprintf (stderr, "%p", CONST_CAST2 (void *, const_tree, type)); fprintf (stderr, ", %d )\n\n", named); } @@ -1632,8 +1633,6 @@ compute_frame_size (HOST_WIDE_INT size) HOST_WIDE_INT gp_reg_size; /* # bytes needed to store gp regs. */ HOST_WIDE_INT fp_reg_size; /* # bytes needed to store fp regs. */ long mask; /* mask of saved gp registers. */ - int fp_inc; /* 1 or 2 depending on the size of fp regs. */ - long fp_bits; /* bitmask to use for each fp register. */ gp_reg_size = 0; fp_reg_size = 0; @@ -1674,8 +1673,6 @@ compute_frame_size (HOST_WIDE_INT size) } } - fp_inc = 2; - fp_bits = 3; gp_reg_rounded = IQ2000_STACK_ALIGN (gp_reg_size); total_size += gp_reg_rounded + IQ2000_STACK_ALIGN (fp_reg_size); @@ -1730,7 +1727,7 @@ iq2000_can_eliminate (const int from, const int to) { return (from == RETURN_ADDRESS_POINTER_REGNUM && (! leaf_function_p () - || (to == GP_REG_FIRST + 31 && leaf_function_p))) + || (to == GP_REG_FIRST + 31 && leaf_function_p ()))) || (from != RETURN_ADDRESS_POINTER_REGNUM && (to == HARD_FRAME_POINTER_REGNUM || (to == STACK_POINTER_REGNUM @@ -1759,6 +1756,8 @@ iq2000_initial_elimination_offset (int from, int to ATTRIBUTE_UNUSED) + ((UNITS_PER_WORD - (POINTER_SIZE / BITS_PER_UNIT)) * (BYTES_BIG_ENDIAN != 0)); } + else + gcc_unreachable (); return offset; } @@ -2002,7 +2001,7 @@ iq2000_expand_prologue (void) for (i = 0; i < num; i++) { - rtx insn, pattern; + rtx pattern; pattern = RTVEC_ELT (adjust, i); if (GET_CODE (pattern) != SET @@ -2010,7 +2009,7 @@ iq2000_expand_prologue (void) abort_with_insn (pattern, "Insn is not a shift"); PUT_CODE (SET_SRC (pattern), ASHIFTRT); - insn = emit_insn (pattern); + emit_insn (pattern); } } @@ -2165,27 +2164,6 @@ iq2000_can_use_return_insn (void) return compute_frame_size (get_frame_size ()) == 0; } -/* Returns nonzero if X contains a SYMBOL_REF. */ - -static int -symbolic_expression_p (rtx x) -{ - if (GET_CODE (x) == SYMBOL_REF) - return 1; - - if (GET_CODE (x) == CONST) - return symbolic_expression_p (XEXP (x, 0)); - - if (UNARY_P (x)) - return symbolic_expression_p (XEXP (x, 0)); - - if (ARITHMETIC_P (x)) - return (symbolic_expression_p (XEXP (x, 0)) - || symbolic_expression_p (XEXP (x, 1))); - - return 0; -} - /* Choose the section to use for the constant rtx expression X that has mode MODE. */ @@ -2251,7 +2229,7 @@ iq2000_function_value (const_tree valtype, int reg = GP_RETURN; enum machine_mode mode = TYPE_MODE (valtype); int unsignedp = TYPE_UNSIGNED (valtype); - tree func = fn_decl_or_type; + const_tree func = fn_decl_or_type; if (fn_decl_or_type && !DECL_P (fn_decl_or_type)) @@ -2651,7 +2629,7 @@ expand_one_builtin (enum insn_code icode, rtx target, tree exp, for (i = 0; i < argcount; i++) { arg[i] = CALL_EXPR_ARG (exp, i); - op[i] = expand_expr (arg[i], NULL_RTX, VOIDmode, 0); + op[i] = expand_normal (arg[i]); mode[i] = insn_data[icode].operand[i].mode; if (code[i] == CONST_INT && GET_CODE (op[i]) != CONST_INT) error ("argument %qd is not a constant", i + 1); @@ -3198,7 +3176,8 @@ iq2000_print_operand (FILE *file, rtx op, int letter) if (code != CONST_INT || (value = exact_log2 (INTVAL (op))) < 0) output_operand_lossage ("invalid %%p value"); - fprintf (file, "%d", value); + else + fprintf (file, "%d", value); } else if (letter == 'Z') |