File: arm-thumb-branch-rangethunk.s

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (37 lines) | stat: -rw-r--r-- 1,632 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// REQUIRES: arm
// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=thumbv7a-none-linux-gnueabi %s -o %t
// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=thumbv7a-none-linux-gnueabi %S/Inputs/far-arm-thumb-abs.s -o %tfar
// RUN: ld.lld  %t %tfar -o %t2
// RUN: llvm-objdump -d %t2
 .syntax unified
 .thumb
 .section .text, "ax",%progbits
 .globl _start
 .balign 0x10000
 .type _start,%function
_start:
 // address of too_far symbols are just out of range of ARM branch with
 // 26-bit immediate field and an addend of -8
 bl  too_far1
 b   too_far2
 beq.w too_far3

// CHECK: Disassembly of section .text:
// CHECK-EMPTY:
// CHECK-NEXT: _start:
// CHECK-NEXT:    20000:       00 f0 04 f8     bl      #8
// CHECK-NEXT:    20004:       00 f0 07 b8     b.w     #14 <__Thumbv7ABSLongThunk_too_far2>
// CHECK-NEXT:    20008:       00 f0 0a 80     beq.w   #20 <__Thumbv7ABSLongThunk_too_far3>
// CHECK: __Thumbv7ABSLongThunk_too_far1:
// CHECK-NEXT:    2000c:       40 f2 05 0c     movw    r12, #5
// CHECK-NEXT:    20010:       c0 f2 02 1c     movt    r12, #258
// CHECK-NEXT:    20014:       60 47   bx      r12
// CHECK: __Thumbv7ABSLongThunk_too_far2:
// CHECK-NEXT:    20016:       40 f2 09 0c     movw    r12, #9
// CHECK-NEXT:    2001a:       c0 f2 02 1c     movt    r12, #258
// CHECK-NEXT:    2001e:       60 47   bx      r12
// CHECK: __Thumbv7ABSLongThunk_too_far3:
// CHECK-NEXT:    20020:       40 f2 0d 0c     movw    r12, #13
// CHECK-NEXT:    20024:       c0 f2 12 0c     movt    r12, #18
// CHECK-NEXT:    20028:       60 47   bx      r12
// CHECK-NEXT:    2002a:       00 00   movs    r0, r0