[PATCH, i386] Never fix register for PIC when pseudo PIC reg is used
Uros Bizjak
ubizjak@gmail.com
Thu Jan 29 13:39:00 GMT 2015
On Thu, Jan 29, 2015 at 12:27 PM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
> On 29 Jan 09:50, Uros Bizjak wrote:
>> On Thu, Jan 29, 2015 at 9:13 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
>>
>> >>> Currently ix86_conditional_register_usage code may mark EBX as a fixed register if it is called
>> >>> when pic_offset_table_rtx is NULL even if we are going to use pseudo PIC register. It already
>> >>> caused some problem in combination with another issue (PR jit/64722). This patch will probably
>> >>> help to avoid problems in the future.
>> >>>
>> >>> BTW if we don't want to support possibility to switch to the fixed PIC register in i386 target then
>> >>> this code may be removed at all.
>> >>
>> >> No, we don't want to switch to fixed PIC register. cpuid asm in
>> >> cpuid.h and cmpxchg8b pattern will break. Please do not bring back the
>> >> dead and remove this code.
>> >
>> > Also, if possible, please simplify PIC_OFFSET_TABLE_REGNUM to use
>> > TARGET_USE_PSEUDO_PIC_REG, like:
>>
>> Ops, better use the attached patch that exports ix86_use_pseudo_pic_reg.
>>
>> Uros.
>
> Hello Uros,
>
> Thank you for review! Here is an updated version with proposed changes. Bootstrapped and tested on x86_64-unknown-linux-gnu. OK for trunk?
>
> Thanks,
> Ilya
> --
> 2015-01-29 Ilya Enkovich <ilya.enkovich@intel.com>
>
> * config/i386/i386-protos.h (ix86_use_pseudo_pic_reg): New.
> * config/i386/i386.h (PIC_OFFSET_TABLE_REGNUM): Simplify by
> using x86_use_pseudo_pic_reg.
> * config/i386/i386.c (ix86_conditional_register_usage): Remove
> support for fixed PIC register.
> (ix86_use_pseudo_pic_reg): Not static any more.
OK.
Thanks,
Uros.
More information about the Gcc-patches
mailing list