mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-03 08:51:43 +00:00
51c8520dd3
Summary: AArch64 LLVM assembler emits add instruction without shift bit to calculate the higher 12-bit address of TLS variables in local exec model. This generates wrong code sequence to access TLS variables with thread offset larger than 0x1000. Reviewers: t.p.northover, peter.smith, rovka Subscribers: salim.nasser, aemerson, llvm-commits, rengolin Differential Revision: https://reviews.llvm.org/D24702 llvm-svn: 282661
13 lines
394 B
ArmAsm
13 lines
394 B
ArmAsm
// RUN: llvm-mc -triple=aarch64-none-linux-gnu -filetype=obj < %s -o - | \
|
|
// RUN: llvm-objdump -r -d - | FileCheck %s
|
|
|
|
// TLS add TPREL
|
|
add x2, x1, #:tprel_hi12:var
|
|
// CHECK: add x2, x1, #0, lsl #12
|
|
// CHECK-NEXT: R_AARCH64_TLSLE_ADD_TPREL_HI12 var
|
|
|
|
// TLS add DTPREL
|
|
add x4, x3, #:dtprel_hi12:var
|
|
// CHECK: add x4, x3, #0, lsl #12
|
|
// CHECK-NEXT: R_AARCH64_TLSLD_ADD_DTPREL_HI12 var
|