/* Subroutines for insn-output.c for VAX.
- Copyright (C) 1987, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002,
- 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 1987-2013 Free Software Foundation, Inc.
This file is part of GCC.
static void vax_output_mi_thunk (FILE *, tree, HOST_WIDE_INT,
HOST_WIDE_INT, tree);
static int vax_address_cost_1 (rtx);
-static int vax_address_cost (rtx, bool);
+static int vax_address_cost (rtx, enum machine_mode, addr_space_t, bool);
static bool vax_rtx_costs (rtx, int, int, int, int *, bool);
static rtx vax_function_arg (cumulative_args_t, enum machine_mode,
const_tree, bool);
static void vax_asm_trampoline_template (FILE *);
static void vax_trampoline_init (rtx, tree, rtx);
static int vax_return_pops_args (tree, tree, int);
+static bool vax_mode_dependent_address_p (const_rtx, addr_space_t);
\f
/* Initialize the GCC target structure. */
#undef TARGET_ASM_ALIGNED_HI_OP
#undef TARGET_LEGITIMATE_ADDRESS_P
#define TARGET_LEGITIMATE_ADDRESS_P vax_legitimate_address_p
+#undef TARGET_MODE_DEPENDENT_ADDRESS_P
+#define TARGET_MODE_DEPENDENT_ADDRESS_P vax_mode_dependent_address_p
#undef TARGET_FRAME_POINTER_REQUIRED
#define TARGET_FRAME_POINTER_REQUIRED hook_bool_void_true
{
rtx x;
- x = plus_constant (frame_pointer_rtx, offset);
+ x = plus_constant (Pmode, frame_pointer_rtx, offset);
x = gen_rtx_MEM (SImode, x);
x = gen_rtx_SET (VOIDmode, x, src);
add_reg_note (insn, REG_CFA_OFFSET, x);
it will be processed first. This is required to allow the other
notes be interpreted properly. */
add_reg_note (insn, REG_CFA_DEF_CFA,
- plus_constant (frame_pointer_rtx, offset));
+ plus_constant (Pmode, frame_pointer_rtx, offset));
/* Allocate the local stack frame. */
size = get_frame_size ();
if (offset)
{
if (CONST_INT_P (offset))
- offset = plus_constant (XEXP (addr, 0), INTVAL (offset));
+ offset = plus_constant (Pmode, XEXP (addr, 0),
+ INTVAL (offset));
else
{
gcc_assert (CONST_INT_P (XEXP (addr, 0)));
- offset = plus_constant (offset, INTVAL (XEXP (addr, 0)));
+ offset = plus_constant (Pmode, offset,
+ INTVAL (XEXP (addr, 0)));
}
}
offset = XEXP (addr, 0);
if (offset)
{
if (CONST_INT_P (offset))
- offset = plus_constant (XEXP (addr, 1), INTVAL (offset));
+ offset = plus_constant (Pmode, XEXP (addr, 1),
+ INTVAL (offset));
else
{
gcc_assert (CONST_INT_P (XEXP (addr, 1)));
- offset = plus_constant (offset, INTVAL (XEXP (addr, 1)));
+ offset = plus_constant (Pmode, offset,
+ INTVAL (XEXP (addr, 1)));
}
}
offset = XEXP (addr, 1);
}
static int
-vax_address_cost (rtx x, bool speed ATTRIBUTE_UNUSED)
+vax_address_cost (rtx x, enum machine_mode mode ATTRIBUTE_UNUSED,
+ addr_space_t as ATTRIBUTE_UNUSED,
+ bool speed ATTRIBUTE_UNUSED)
{
return (1 + (REG_P (x) ? 0 : vax_address_cost_1 (x)));
}
increment being the length of the operand) and all indexed address depend
thus (because the index scale factor is the length of the operand). */
-bool
-vax_mode_dependent_address_p (rtx x)
+static bool
+vax_mode_dependent_address_p (const_rtx x, addr_space_t as ATTRIBUTE_UNUSED)
{
rtx xfoo0, xfoo1;
mem = adjust_address (m_tramp, SImode, 4);
emit_move_insn (mem, cxt);
mem = adjust_address (m_tramp, SImode, 11);
- emit_move_insn (mem, plus_constant (fnaddr, 2));
+ emit_move_insn (mem, plus_constant (Pmode, fnaddr, 2));
emit_insn (gen_sync_istream ());
}