[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / arm-branch-rangethunk.s
blobc9d185f4ff3692cf3fb82ac184a91938b83b97dd
1 // REQUIRES: arm
2 // RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t
3 // RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=armv7a-none-linux-gnueabi %S/Inputs/far-arm-abs.s -o %tfar
4 // RUN: ld.lld %t %tfar -o %t2
5 // RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn --triple=armv7a-none-linux-gnueabi %t2 | FileCheck --check-prefix=SHORT %s
6 // RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=armv7a-none-linux-gnueabi %S/Inputs/far-long-arm-abs.s -o %tfarlong
7 // RUN: ld.lld %t %tfarlong -o %t3
8 // RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn --triple=armv7a-none-linux-gnueabi %t3 | FileCheck --check-prefix=LONG %s
9 .syntax unified
10 .section .text, "ax",%progbits
11 .globl _start
12 .balign 0x10000
13 .type _start,%function
14 _start:
15 /// address of too_far symbols are just out of range of ARM branch with
16 /// 26-bit immediate field and an addend of -8
17 bl too_far1
18 b too_far2
19 beq too_far3
21 // SHORT: 00030000 <_start>:
22 // SHORT-NEXT: 30000: bl 0x3000c <__ARMv7ABSLongThunk_too_far1>
23 // SHORT-NEXT: 30004: b 0x30010 <__ARMv7ABSLongThunk_too_far2>
24 // SHORT-NEXT: 30008: beq 0x30014 <__ARMv7ABSLongThunk_too_far3>
25 // SHORT: 0003000c <__ARMv7ABSLongThunk_too_far1>:
26 /// 0x2030008 = too_far1
27 // SHORT-NEXT: 3000c: b 0x2030008
28 // SHORT: 00030010 <__ARMv7ABSLongThunk_too_far2>:
29 /// 0x203000c = too_far2
30 // SHORT-NEXT: 30010: b 0x203000c
31 // SHORT: 00030014 <__ARMv7ABSLongThunk_too_far3>:
32 /// 0x2030010 = too_far3
33 // SHORT-NEXT: 30014: b 0x2030010
35 // LONG: 00030000 <_start>:
36 // LONG-NEXT: 30000: bl 0x3000c <__ARMv7ABSLongThunk_too_far1>
37 // LONG-NEXT: 30004: b 0x30018 <__ARMv7ABSLongThunk_too_far2>
38 // LONG-NEXT: 30008: beq 0x30024 <__ARMv7ABSLongThunk_too_far3>
39 // LONG: 0003000c <__ARMv7ABSLongThunk_too_far1>:
40 // LONG-NEXT: 3000c: movw r12, #20
41 // LONG-NEXT: 30010: movt r12, #515
42 // LONG-NEXT: 30014: bx r12
43 // LONG: 00030018 <__ARMv7ABSLongThunk_too_far2>:
44 // LONG-NEXT: 30018: movw r12, #32
45 // LONG-NEXT: 3001c: movt r12, #515
46 // LONG-NEXT: 30020: bx r12
47 // LONG: 00030024 <__ARMv7ABSLongThunk_too_far3>:
48 // LONG-NEXT: 30024: movw r12, #44
49 // LONG-NEXT: 30028: movt r12, #515
50 // LONG-NEXT: 3002c: bx r12