2 // RUN
: llvm-mc
-filetype
=obj
-triple
=aarch64-none-linux
%s
-o
%t.o
3 // RUN
: echo
"SECTIONS { \
4 // RUN: .text1 0x10000 : { *(.text.01) *(.text.02) *(.text.03) } \
5 // RUN: .text2 0x8010000 : { *(.text.04) } } " > %t.script
6 // RUN
: ld.lld
--script
%t.script
-fix-cortex-a53-
843419 -verbose
%t.o
-o
%t2 \
7 // RUN
: 2>&1 | FileCheck
-check-prefix
=CHECK-PRINT
%s
8 // RUN
: llvm-objdump
--no-show-raw-insn
--triple
=aarch64-linux-gnu
-d
%t2 | FileCheck
%s
10 /// %t2 is
128 Megabytes
, so delete it early.
13 /// Test cases for Cortex-A53 Erratum
843419 that involve interactions with
14 /// range extension thunks. Both erratum fixes
and range extension thunks need
15 /// precise address information
and after creation alter address information.
18 .section .text.01, "ax", %progbits
21 .type _start, %function
24 /// Thunk to far_away
, size
16-bytes goes here.
26 .section .text.02, "ax", %progbits
29 /// Erratum sequence will only line up at address
0 modulo
0xffc when
30 /// Thunk is inserted.
31 .section .text.03, "ax", %progbits
33 .type t3_ff8_ldr, %function
37 ldr x0
, [x0
, :got_lo12
:dat
]
40 // CHECK-PRINT
: detected cortex-a53-
843419 erratum sequence starting at
10FF8 in unpatched output.
41 // CHECK
: 0000000000010ff8
<t3_ff8_ldr
>:
42 // CHECK-NEXT
: adrp x0
, 0x8010000
43 // CHECK-NEXT
: ldr x1
, [x1
]
44 // CHECK-NEXT
: b 0x11008
46 // CHECK
: 0000000000011008 <__CortexA53843419_11000
>:
47 // CHECK-NEXT
: ldr x0
, [x0
, #8]
48 // CHECK-NEXT
: b 0x11004
49 .section .text.04, "ax", %progbits
51 .type far_away, function