On Tue, Jul 19, 2011 at 10:12 AM, Richard Henderson <r...@redhat.com> wrote:
> On 07/18/2011 09:45 PM, H.J. Lu wrote:
>> @@ -14861,14 +14919,22 @@ ix86_output_addr_vec_elt (FILE *file, int value)
>>  {
>>    const char *directive = ASM_LONG;
>>
>> +  if (TARGET_X32)
>> +    {
>> +      fprintf (file, "%s%s%d\n", directive, LPREFIX, value);
>> +      fprintf (file, "%s0\n", directive);
>
> Why store more data than is needed?  Just adjust the emission of
> the tablejump to use a register.

I had it in my x32 tree. But I reverted:

http://gcc.gnu.org/ml/gcc-patches/2011-02/msg00954.html

since Pmode is used in non-PIC tablejump, we have to put 64bit value for
labels with 0 upper 32bits in tablejump for x32.

>>  (define_insn "*indirect_jump"
>>    [(set (pc) (match_operand:P 0 "nonimmediate_operand" "rm"))]
>> -  ""
>> +  "!TARGET_X32"
>> +  "jmp\t%A0"
>> +  [(set_attr "type" "ibr")
>> +   (set_attr "length_immediate" "0")])
>> +
>> +(define_insn "*indirect_jump_x32"
>> +  [(set (pc) (match_operand:P 0 "register_operand" "r"))]
>> +  "TARGET_X32"
>>    "jmp\t%A0"
>>    [(set_attr "type" "ibr")
>
> These, and all the other patterns you duplicate, can be merged
> via proper use of predicates and macros for the constraints.
>

Will do that.

Thanks.


-- 
H.J.

Reply via email to