This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PARCH 1/2, x86, PR63534] Fix darwin bootstrap


When PIC register is pseudo there is nothing special about it's value
that setjmp can hurt. So if the pseudo register lives across
setjmp_receiver RA should care about correct allocation (in case it is
not saved/restored, it should go on stack). gcc.dg tests and specs
I've tested behave like this.

The initial problem comes from non-local goto as it tries to emit
pseudo PIC register after reload.

On Fri, Oct 31, 2014 at 11:14 PM, Jeff Law <law@redhat.com> wrote:
> On 10/17/14 08:08, Evgeny Stupachenko wrote:
>>
>> Hi,
>>
>> The patch fixes 1st fail in darwin bootstarp.
>> When PIC register is pseudo we don't need to init it after setjmp or
>> non local goto.
>>
>> Is it ok?
>>
>> ChangeLog:
>>
>> 2014-10-17  Evgeny Stupachenko  <evstupac@gmail.com>
>>
>>          PR target/63534
>>          * config/i386/i386.c (builtin_setjmp_receiver): Delete.
>>          (nonlocal_goto_receiver): Ditto.
>
>
> Why do you think they're not needed?  The builtin setjmp/longjmp
> implementation do not behave like what you're used to in the C library.
> Specifically, they do not save/restore register state beyond SP, FP and
> possibly ARGP.
>
> So let's take one step back -- what precisely about these patterns was
> causing a problem?    My initial inclination is that we must set the PIC
> register here in the same manner as it's set in the prologue.
>
>
>
> Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]