2007-10-19 Richard Sandiford <rsandifo@nildram.co.uk>
+ * config/mips/mips.c (mips_call_tls_get_addr): Use gen_const_mem
+ rather then gen_rtx_MEM.
+ (mips_setup_incoming_varargs): Use gen_frame_mem rather than
+ gen_rtx_MEM.
+ (mips_set_return_address): Likewise.
+ (mips_restore_gp): Likewise.
+
+2007-10-19 Richard Sandiford <rsandifo@nildram.co.uk>
+
* config/mips/mips.c (gpr_mode): Delete.
(mips16e_build_save_restore): Use word_mode and UNITS_PER_WORD
instead of gpr_mode.
emit_insn (gen_rtx_SET (Pmode, a0,
gen_rtx_LO_SUM (Pmode, pic_offset_table_rtx, loc)));
- tga = gen_rtx_MEM (Pmode, mips_tls_symbol);
+ tga = gen_const_mem (Pmode, mips_tls_symbol);
insn = emit_call_insn (gen_call_value (v0, tga, const0_rtx, const0_rtx));
CONST_OR_PURE_CALL_P (insn) = 1;
use_reg (&CALL_INSN_FUNCTION_USAGE (insn), v0);
ptr = plus_constant (virtual_incoming_args_rtx,
REG_PARM_STACK_SPACE (cfun->decl)
- gp_saved * UNITS_PER_WORD);
- mem = gen_rtx_MEM (BLKmode, ptr);
+ mem = gen_frame_mem (BLKmode, ptr);
set_mem_alias_set (mem, get_varargs_alias_set ());
move_block_from_reg (local_cum.num_gprs + GP_ARG_FIRST,
rtx ptr, mem;
ptr = plus_constant (virtual_incoming_args_rtx, off);
- mem = gen_rtx_MEM (mode, ptr);
+ mem = gen_frame_mem (mode, ptr);
set_mem_alias_set (mem, get_varargs_alias_set ());
mips_emit_move (mem, gen_rtx_REG (mode, FP_ARG_FIRST + i));
off += UNITS_PER_HWFPVALUE;
slot_address = mips_add_offset (scratch, stack_pointer_rtx,
cfun->machine->frame.gp_sp_offset);
- mips_emit_move (gen_rtx_MEM (GET_MODE (address), slot_address), address);
+ mips_emit_move (gen_frame_mem (GET_MODE (address), slot_address), address);
}
/* Restore $gp from its save slot. Valid only when using o32 or
void
mips_restore_gp (void)
{
- rtx address, slot;
+ rtx address;
gcc_assert (TARGET_ABICALLS && TARGET_OLDABI);
? hard_frame_pointer_rtx
: stack_pointer_rtx,
current_function_outgoing_args_size);
- slot = gen_rtx_MEM (Pmode, address);
- mips_emit_move (pic_offset_table_rtx, slot);
+ mips_emit_move (pic_offset_table_rtx, gen_frame_mem (Pmode, address));
if (!TARGET_EXPLICIT_RELOCS)
emit_insn (gen_blockage ());
}