[PATCH] Fix ix86_split_long_move collision handling with TLS (PR target/66470)

Uros Bizjak ubizjak@gmail.com
Wed Jun 10 07:13:00 GMT 2015


On Wed, Jun 10, 2015 at 9:06 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Wed, Jun 10, 2015 at 08:06:08AM +0200, Uros Bizjak wrote:
>> > If -mx32 is a non-issue here, then perhaps my initial patch is good enough?
>>
>> It looks to me, that if you detect and record zero-extended UNSPEC_TP,
>> your original patch would also handle -mx32.
>>
>> Can you please repost your original patch with the above addition?
>
> I've managed to come up with a testcase that ICEs on -mx32 (with
> -maddress-mode=long, with the default UNSPEC_TP seems to be always loaded
> separately), and this version fixes even that, ok for trunk/5/4.9/4.8?
>
> 2015-06-10  Jakub Jelinek  <jakub@redhat.com>
>
>         PR target/66470
>         * config/i386/i386.c (ix86_split_long_move): For collisions
>         involving direct tls segment refs, move the UNSPEC_TP possibly
>         wrapped in ZERO_EXTEND out of the address for lea, to each of
>         the memory loads.
>
>         * gcc.dg/tls/pr66470.c: New test.
>         * gcc.target/i386/pr66470.c: New test.

Yes, this patch is OK for mainline and release branches.

Thanks,
Uros.



More information about the Gcc-patches mailing list