/* Subroutines used for code generation on Vitesse IQ2000 processors
- Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 2003-2013 Free Software Foundation, Inc.
This file is part of GCC.
enum machine_mode, tree, int *,
int);
static bool iq2000_rtx_costs (rtx, int, int, int, int *, bool);
-static int iq2000_address_cost (rtx, bool);
+static int iq2000_address_cost (rtx, enum machine_mode, addr_space_t,
+ bool);
static section *iq2000_select_section (tree, int, unsigned HOST_WIDE_INT);
static rtx iq2000_legitimize_address (rtx, rtx, enum machine_mode);
static bool iq2000_pass_by_reference (cumulative_args_t, enum machine_mode,
/* Provide the costs of an addressing mode that contains ADDR. */
static int
-iq2000_address_cost (rtx addr, bool speed)
+iq2000_address_cost (rtx addr, enum machine_mode mode, addr_space_t as,
+ bool speed)
{
switch (GET_CODE (addr))
{
case LABEL_REF:
case HIGH:
case LO_SUM:
- return iq2000_address_cost (plus1, speed) + 1;
+ return iq2000_address_cost (plus1, mode, as, speed) + 1;
default:
break;
emit_jump_insn (gen_rtx_SET (VOIDmode, pc_rtx,
gen_rtx_IF_THEN_ELSE (VOIDmode,
gen_rtx_fmt_ee (test_code,
- mode,
+ VOIDmode,
cmp0, cmp1),
label1, label2)));
}
"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", CONST_CAST2 (void *, const_tree, type));
+ fprintf (stderr, "%p", (const void *) type);
fprintf (stderr, ", %d )\n\n", named);
}
/* Everything is in the GPR save area, or in the overflow
area which is contiguous with it. */
- nextarg = plus_constant (nextarg, - gpr_save_area_size);
+ nextarg = plus_constant (Pmode, nextarg, - gpr_save_area_size);
std_expand_builtin_va_start (valist, nextarg);
}
\f
static void
iq2000_emit_frame_related_store (rtx mem, rtx reg, HOST_WIDE_INT offset)
{
- rtx dwarf_address = plus_constant (stack_pointer_rtx, offset);
+ rtx dwarf_address = plus_constant (Pmode, stack_pointer_rtx, offset);
rtx dwarf_mem = gen_rtx_MEM (GET_MODE (reg), dwarf_address);
iq2000_annotate_frame_insn (emit_move_insn (mem, reg),
adjustment_rtx));
dwarf_pattern = gen_rtx_SET (Pmode, stack_pointer_rtx,
- plus_constant (stack_pointer_rtx, -tsize));
+ plus_constant (Pmode, stack_pointer_rtx,
+ -tsize));
iq2000_annotate_frame_insn (insn, dwarf_pattern);
HOST_WIDE_INT gp_offset = cfun->machine->gp_sp_offset;
rtx scratch;
- scratch = plus_constant (stack_pointer_rtx, gp_offset);
+ scratch = plus_constant (Pmode, stack_pointer_rtx, gp_offset);
emit_move_insn (gen_rtx_MEM (GET_MODE (address), scratch), address);
}
\f
if (cum->arg_words < MAX_ARGS_IN_REGISTERS - iq2000_off)
{
rtx ptr, mem;
- ptr = plus_constant (virtual_incoming_args_rtx,
- - (iq2000_save_gp_regs
- * UNITS_PER_WORD));
+ ptr = plus_constant (Pmode, virtual_incoming_args_rtx,
+ - (iq2000_save_gp_regs
+ * UNITS_PER_WORD));
mem = gen_rtx_MEM (BLKmode, ptr);
move_block_from_reg
(cum->arg_words + GP_ARG_FIRST + iq2000_off,
else if (code == MEM)
{
if (letter == 'D')
- output_address (plus_constant (XEXP (op, 0), 4));
+ output_address (plus_constant (Pmode, XEXP (op, 0), 4));
else
output_address (XEXP (op, 0));
}
ptr_reg,
gen_rtx_PLUS (Pmode, xplus0, int_reg)));
- return plus_constant (ptr_reg, INTVAL (xplus1) & 0x7fff);
+ return plus_constant (Pmode, ptr_reg, INTVAL (xplus1) & 0x7fff);
}
}