diff options
author | Fangrui Song <maskray@google.com> | 2019-05-29 02:02:59 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-05-29 02:02:59 +0000 |
commit | 656afe370df3ac374db7624e0b450f15a2212ab2 (patch) | |
tree | 207ecb0fceff3bdbf3220c9b3210f8ee86ba699e /llvm/lib/CodeGen/MachineModuleInfo.cpp | |
parent | 529118fc87c0ca274a4355c3f90ddd7b07215b2d (diff) | |
download | llvm-656afe370df3ac374db7624e0b450f15a2212ab2.zip llvm-656afe370df3ac374db7624e0b450f15a2212ab2.tar.gz llvm-656afe370df3ac374db7624e0b450f15a2212ab2.tar.bz2 |
[X86] Fix x86-64 call *foo@tlsdesc(%rax) and support R_386_TLSGOTDESC R_386_TLS_DESC_CALL
D18885 emitted 5 bytes for call *foo@tlsdesc(%rax). It should use the
2-byte form instead and let R_X86_64_TLSDESC_CALL apply to the beginning
of the call instruction.
The 2-byte form was deliberately chosen to make ->LE and ->IE relaxation work:
0: 48 8d 05 00 00 00 00 lea 0x0(%rip),%rax # 7 <.text+0x7>
3: R_X86_64_GOTPC32_TLSDESC a-0x4
7: ff 10 callq *(%rax)
7: R_X86_64_TLSDESC_CALL a
=>
0: 48 c7 c0 fc ff ff ff mov $0xfffffffffffffffc,%rax
7: 66 90 xchg %ax,%ax
Also change the symbol type to STT_TLS when VK_TLSCALL or VK_TLSDESC is
seen.
Reviewed By: compnerd
Differential Revision: https://reviews.llvm.org/D62512
llvm-svn: 361910
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
0 files changed, 0 insertions, 0 deletions