[Bug target/96955] Implement __builtin_thread_pointer for x86 TLS
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Sep 9 17:44:05 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96955
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:
https://gcc.gnu.org/g:bf69edf8ce47ca618eff30df2308279a40b22096
commit r11-3081-gbf69edf8ce47ca618eff30df2308279a40b22096
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Sep 9 10:29:47 2020 -0700
x32: Update gcc.target/i386/builtin_thread_pointer.c
Update gcc.target/i386/builtin_thread_pointer.c for x32. For
int
foo3 (int i)
{
int* p = (int*) __builtin_thread_pointer ();
return p[i];
}
we can't generate:
movl %fs:0(,%edi,4), %eax
ret
for x32 since the address of %fs:0(,%edi,4) is %fs + zero-extended to 64
bits of 0(,%edi,4). Instead, we generate:
movl %fs:0, %eax
movl (%eax,%edi,4), %eax
PR target/96955
* gcc.target/i386/builtin_thread_pointer.c: Update scan-assembler
for x32.
More information about the Gcc-bugs
mailing list