Commit Message

Hi!
On x86_64 with -mcmodel=large -fpic -g -O2 we get tons of
notes about non-delegitimized unspecs like UNSPEC_GOTOFF, UNSPEC_PLTOFF
or UNSPEC_GOT. Seems we already handle most of those properly for -m32
code, so the issue is just that we wouldn't fall back into the -m32 handling
code which takes care of dealing with addends, missing pic pointer etc.
The following patch inverts the last condition for TARGET_64BIT code
and falls through for CM_MEDIUM_PIC and CM_LARGE_PIC cmodels.
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
2013-08-13 Jakub Jelinek <jakub@redhat.com>
Alexandre Oliva <aoliva@redhat.com>
PR target/58067
* config/i386/i386.c (ix86_delegitimize_address): For CM_MEDIUM_PIC
and CM_LARGE_PIC ix86_cmodel fall thru into the -m32 code, handle
there also UNSPEC_PLTOFF.
Jakub

Comments

On Tue, Aug 13, 2013 at 9:47 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On x86_64 with -mcmodel=large -fpic -g -O2 we get tons of> notes about non-delegitimized unspecs like UNSPEC_GOTOFF, UNSPEC_PLTOFF> or UNSPEC_GOT. Seems we already handle most of those properly for -m32> code, so the issue is just that we wouldn't fall back into the -m32 handling> code which takes care of dealing with addends, missing pic pointer etc.> The following patch inverts the last condition for TARGET_64BIT code> and falls through for CM_MEDIUM_PIC and CM_LARGE_PIC cmodels.>> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?>> 2013-08-13 Jakub Jelinek <jakub@redhat.com>> Alexandre Oliva <aoliva@redhat.com>>> PR target/58067> * config/i386/i386.c (ix86_delegitimize_address): For CM_MEDIUM_PIC> and CM_LARGE_PIC ix86_cmodel fall thru into the -m32 code, handle> there also UNSPEC_PLTOFF.
OK, also for backport to other release branches.
Thanks,
Uros.