39 lines · plain
1// REQUIRES: aarch642// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o3// RUN: ld.lld -fix-cortex-a53-843419 %t.o -o %t24// RUN: llvm-objdump --no-print-imm-hex --triple=aarch64-linux-gnu -d %t2 | FileCheck %s5 6// The following code sequence is covered by the TLS IE to LE relaxation. It7// transforms the ADRP, LDR to MOVZ, MOVK. The former can trigger a8// cortex-a53-843419 patch, whereas the latter can not. As both9// relaxation and patching transform instructions very late in the10// link there is a possibility of them both being simultaneously11// applied. In this case the relaxed sequence is immune from the erratum so we12// prefer to keep it.13 .text14 .balign 409615 .space 4096 - 816 .globl _start17 .type _start,@function18_start:19 mrs x1, tpidr_el020 adrp x0, :gottprel:v21 ldr x1, [x0, #:gottprel_lo12:v]22 adrp x0, :gottprel:v23 ldr x1, [x0, #:gottprel_lo12:v]24 ret25 26// CHECK: <_start>:27// CHECK-NEXT: 211ff8: d53bd041 mrs x1, TPIDR_EL028// CHECK-NEXT: 211ffc: d2a00000 movz x0, #0, lsl #1629// CHECK-NEXT: 212000: f2800201 movk x1, #1630// CHECK-NEXT: 212004: d2a00000 movz x0, #0, lsl #1631// CHECK-NEXT: 212008: f2800201 movk x1, #1632// CHECK-NEXT: 21200c: d65f03c0 ret33 34 .type v,@object35 .section .tbss,"awT",@nobits36 .globl v37v:38 .word 039