2 // RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %s -o %t.o
3 // RUN: ld.lld -fix-cortex-a53-843419 %t.o -o %t2
4 // RUN: llvm-objdump -triple=aarch64-linux-gnu -d %t2 | FileCheck %s
6 // The following code sequence is covered by the TLS IE to LE relaxation. It
7 // transforms the ADRP, LDR to MOVZ, MOVK. The former can trigger a
8 // cortex-a53-843419 patch, whereas the latter can not. As both
9 // relaxation and patching transform instructions very late in the
10 // link there is a possibility of them both being simultaneously
11 // applied. In this case the relaxed sequence is immune from the erratum so we
17 .type _start,@function
21 ldr x1, [x0, #:gottprel_lo12:v]
23 ldr x1, [x0, #:gottprel_lo12:v]
27 // CHECK-NEXT: 210ff8: 41 d0 3b d5 mrs x1, TPIDR_EL0
28 // CHECK-NEXT: 210ffc: 00 00 a0 d2 movz x0, #0, lsl #16
29 // CHECK-NEXT: 211000: 01 08 80 f2 movk x1, #64
30 // CHECK-NEXT: 211004: 00 00 a0 d2 movz x0, #0, lsl #16
31 // CHECK-NEXT: 211008: 01 08 80 f2 movk x1, #64
32 // CHECK-NEXT: 21100c: c0 03 5f d6 ret
35 .section .tbss,"awT",@nobits