This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PARCH 1/2, x86, PR63534] Fix darwin bootstrap
- From: Evgeny Stupachenko <evstupac at gmail dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Uros Bizjak <ubizjak at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>, iains at gcc dot gnu dot org
- Date: Sat, 1 Nov 2014 15:39:59 +0300
- Subject: Re: [PARCH 1/2, x86, PR63534] Fix darwin bootstrap
- Authentication-results: sourceware.org; auth=none
- References: <CAOvf_xwDUU=gsQqHgybovAFHbn1+OVHYNBw+=xG0jau1wG2HDg at mail dot gmail dot com> <5453EDBD dot 9070303 at redhat dot com>
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