[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / arm-thunk-largesection.s
blob6d06a4862a07c59d859dabad98944e732cb3ae96
1 // REQUIRES: arm
2 // RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=thumbv7a-none-linux-gnueabi %s -o %t
3 // RUN: ld.lld %t -o %t2
4 // RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn --start-address=0x21000 --stop-address=0x21006 %t2 | FileCheck --check-prefix=CHECK1 %s
5 // RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn --start-address=0x22004 --stop-address=0x22008 %t2 | FileCheck --check-prefix=CHECK2 %s
6 // RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn --start-address=0x1021ff8 --stop-address=0x1021ffc %t2 | FileCheck --check-prefix=CHECK3 %s
7 // RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn --start-address=0x2012ff8 --stop-address=0x2021ffc %t2 | FileCheck --check-prefix=CHECK4 %s
8 // RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn --start-address=0x3021fec --stop-address=0x3021ff6 %t2 | FileCheck --check-prefix=CHECK5 %s
10 // RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=thumbv7aeb-none-linux-gnueabi -mcpu=cortex-a8 %s -o %t
11 // RUN: ld.lld %t -o %t2
12 // RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn --start-address=0x21000 --stop-address=0x21006 %t2 | FileCheck --check-prefix=CHECK1 %s
13 // RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn --start-address=0x22004 --stop-address=0x22008 %t2 | FileCheck --check-prefix=CHECK2 %s
14 // RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn --start-address=0x1021ff8 --stop-address=0x1021ffc %t2 | FileCheck --check-prefix=CHECK3 %s
15 // RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn --start-address=0x2012ff8 --stop-address=0x2021ffc %t2 | FileCheck --check-prefix=CHECK4 %s
16 // RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn --start-address=0x3021fec --stop-address=0x3021ff6 %t2 | FileCheck --check-prefix=CHECK5 %s
18 // RUN: ld.lld --be8 %t -o %t2
19 // RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn --start-address=0x21000 --stop-address=0x21006 %t2 | FileCheck --check-prefix=CHECK1 %s
20 // RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn --start-address=0x22004 --stop-address=0x22008 %t2 | FileCheck --check-prefix=CHECK2 %s
21 // RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn --start-address=0x1021ff8 --stop-address=0x1021ffc %t2 | FileCheck --check-prefix=CHECK3 %s
22 // RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn --start-address=0x2012ff8 --stop-address=0x2021ffc %t2 | FileCheck --check-prefix=CHECK4 %s
23 // RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn --start-address=0x3021fec --stop-address=0x3021ff6 %t2 | FileCheck --check-prefix=CHECK5 %s
25 .syntax unified
26 .balign 0x1000
27 .thumb
28 .text
29 .globl _start
30 .type _start, %function
31 _start:
32 bx lr
33 .space 0x1000
34 // CHECK1: <_start>:
35 // CHECK1-NEXT: 21000: bx lr
36 // CHECK1-NEXT: 21002: 00 00 00 00 .word 0x00000000
39 // CHECK2: <__Thumbv7ABSLongThunk__start>:
40 // CHECK2-NEXT: 22004: b.w 0x21000 <_start>
42 /// Gigantic section where we need a ThunkSection either side of it
43 .section .text.large1, "ax", %progbits
44 .balign 4
45 .space (16 * 1024 * 1024) - 16
46 bl _start
47 .space (16 * 1024 * 1024) - 4
48 bl _start
49 .space (16 * 1024 * 1024) - 16
50 // CHECK3: 1021ff8: bl 0x22004 <__Thumbv7ABSLongThunk__start>
51 // CHECK4: 2021ff8: bl 0x3021fec <__Thumbv7ABSLongThunk__start>
53 // CHECK5: <__Thumbv7ABSLongThunk__start>:
54 // CHECK5-NEXT: 3021fec: movw r12, #4097
55 // CHECK5-NEXT: 3021ff0: movt r12, #2
56 // CHECK5-NEXT: 3021ff4: bx r12