Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / arm-thunk-nosuitable.s
blobdbd8334a2db176259a5829c2a0b79ac54ce4e244
1 // REQUIRES: arm
2 // RUN: llvm-mc %s --arm-add-build-attributes --triple=armv7a-linux-gnueabihf --filetype=obj -o %t.o
3 // RUN: ld.lld %t.o -o %t
4 // RUN: llvm-objdump -d --start-address=0x2200b4 --stop-address=0x2200be %t | FileCheck %s
6 // RUN: llvm-mc %s --arm-add-build-attributes --triple=armv7aeb-linux-gnueabihf --filetype=obj -mcpu=cortex-a8 -o %t.o
7 // RUN: ld.lld %t.o -o %t
8 // RUN: llvm-objdump -d --start-address=0x2200b4 --stop-address=0x2200be %t | FileCheck %s
9 // RUN: ld.lld --be8 %t.o -o %t
10 // RUN: llvm-objdump -d --start-address=0x2200b4 --stop-address=0x2200be %t | FileCheck %s
12 /// Create a conditional branch too far away from a precreated thunk
13 /// section. This will need a thunk section created within range.
14 .syntax unified
15 .thumb
17 .section .text.0, "ax", %progbits
18 .space 2 * 1024 * 1024
19 .globl _start
20 .type _start, %function
21 _start:
22 /// Range of +/- 1 Megabyte, new ThunkSection will need creating after
23 /// .text.1
24 beq.w target
25 .section .text.1, "ax", %progbits
26 bx lr
28 // CHECK: <_start>:
29 // CHECK-NEXT: 2200b4: f000 8000 beq.w 0x2200b8 <__Thumbv7ABSLongThunk_target>
30 // CHECK: <__Thumbv7ABSLongThunk_target>:
31 // CHECK-NEXT: 2200b8: f000 9001 b.w 0xe200be <target>
32 // CHECK: 2200bc: 4770 bx lr
34 .section .text.2, "ax", %progbits
35 .space 12 * 1024 * 1024
36 .globl target
37 .type target, %function
38 target: bx lr