This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH [7/n] X32: Handle address output and calls patterns
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Uros Bizjak <ubizjak at gmail dot com>
- Date: Tue, 19 Jul 2011 10:18:41 -0700
- Subject: Re: PATCH [7/n] X32: Handle address output and calls patterns
- References: <20110719044537.GA3605@intel.com> <4E25BAF5.1000900@redhat.com>
On Tue, Jul 19, 2011 at 10:12 AM, Richard Henderson <rth@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.