This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix i?86 pic thunk generation (PR target/60568)
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Henderson <rth at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 20 Mar 2014 10:51:04 +0100
- Subject: Re: [PATCH] Fix i?86 pic thunk generation (PR target/60568)
- Authentication-results: sourceware.org; auth=none
- References: <20140320090504 dot GF1817 at tucnak dot redhat dot com>
On Thu, Mar 20, 2014 at 10:05 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> With -flto -fpic -m32 sometimes (unfortunately the testcase provided was
> in form of *.o file with LTO bytecode, so can't be reduced), if the thunk
> target doesn't bind locally we get ICE because we can't recog what
> x86_output_mi_thunk creates. The problem is that it doesn't
> put UNSPEC_GOT into CONST and thus ix86_decompose_address refuses it.
>
> Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux and
> tested with the testcase that it doesn't ICE anymore and can be properly
> assembled. Ok for trunk?
>
> 2014-03-19 Jakub Jelinek <jakub@redhat.com>
>
> PR target/60568
> * config/i386/i386.c (x86_output_mi_thunk): Surround UNSPEC_GOT
> into CONST, put pic register as first operand of PLUS. Use
> gen_const_mem for both 32-bit and 64-bit PIC got loads.
OK for mainline, and also other release branches.
Thanks,
Uros.