PATCH [8/n] X32: Convert to Pmode if needed
H.J. Lu
hjl.tools@gmail.com
Tue Jul 19 19:09:00 GMT 2011
On Tue, Jul 19, 2011 at 10:49 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Tue, Jul 19, 2011 at 6:47 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:
>
>> This patch adds the missing Pmode check and conversion. OK for trunk?
>
>> 2011-07-18 H.J. Lu <hongjiu.lu@intel.com>
>>
>> * config/i386/i386.c (ix86_legitimize_address): Convert to
>> Pmode if needed.
>> (ix86_expand_move): Likewise.
>> (ix86_expand_call): Likewise.
>> (ix86_expand_special_args_builtin): Likewise.
>> (ix86_expand_builtin): Likewise.
>
> copy_addr_to_reg ?
>
The change is
arg0 = CALL_EXPR_ARG (exp, 0);
op1 = expand_normal (arg0);
if (!address_operand (op1, VOIDmode))
- op1 = copy_addr_to_reg (op1);
+ {
+ op1 = convert_memory_address (Pmode, op1);
+ op1 = copy_addr_to_reg (op1);
+ }
emit_move_insn (gen_rtx_MEM (mode0, op1), op0);
op1 = gen_reg_rtx (SImode);
OP1 may not be in Pmode. My change calls convert_memory_address
before calling copy_addr_to_reg (op1).
--
H.J.
More information about the Gcc-patches
mailing list