On Wed, Jul 20, 2011 at 2:24 PM, Richard Henderson <r...@redhat.com> wrote:
> On 07/20/2011 02:00 PM, H.J. Lu wrote:
>>        operands[0] = expand_simple_binop (Pmode, code, op0, op1, NULL_RTX, 0,
>>                                        OPTAB_DIRECT);
>>      }
>> +  else if (TARGET_X32)
>> +    operands[0] = convert_memory_address (Pmode, operands[0]);
>>  })
>>
>>  (define_insn "*tablejump_1"
>> ---
>>
>> Richard, is this OK for trunk with the last patch if they work?
>
> Yeah.
>
> I had put the convert_memory_address first, because I thought it
> would help match modes inside the PIC section as well. Anyway, I
> see that expand_simple_binop will handle mode conversions itself,
> so this placement is also ok.  I'm only mildly curious as to why
> that placement failed.
>

The difference is:

Working:

   72d0:       4e 63 3c b8             movslq (%rax,%r15,4),%r15
    72d4:       4c 01 f8                add    %r15,%rax
    72d7:       ff e0                   jmpq   *%rax

not working:

    72d0:       46 8b 3c b8             mov    (%rax,%r15,4),%r15d
    72d4:       4c 01 f8                add    %r15,%rax
    72d7:       ff e0                   jmpq   *%rax

-- 
H.J.

Reply via email to