File: arm-thumb-interwork-abs.s

package info (click to toggle)
swiftlang 6.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,791,604 kB
  • sloc: cpp: 9,901,740; ansic: 2,201,431; asm: 1,091,827; python: 308,252; objc: 82,166; f90: 80,126; lisp: 38,358; pascal: 25,559; sh: 20,429; ml: 5,058; perl: 4,745; makefile: 4,484; awk: 3,535; javascript: 3,018; xml: 918; fortran: 664; cs: 573; ruby: 396
file content (38 lines) | stat: -rw-r--r-- 1,513 bytes parent folder | download | duplicates (23)
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
38
// REQUIRES: arm
// RUN: llvm-mc --triple=armv7a-linux-gnueabihf -arm-add-build-attributes -filetype=obj -o %t.o %s
// RUN: ld.lld %t.o --defsym sym=0x13001 -o %t 2>&1 | FileCheck %s --check-prefix=WARN
// RUN: llvm-objdump --no-show-raw-insn -d %t | FileCheck %s

/// A similar test to arm-thumb-interwork-notfunc.s this time exercising the
/// case where a symbol does not have type STT_FUNC but it does have the bottom
/// bit set. We use absolute symbols to represent assembler labels as the
/// minimum alignment of a label in code is 2.
.syntax unified
.global sym
.global _start
.type _start, %function
.text
.balign 0x1000
_start:
arm_caller:
.arm
  b sym
  bl sym
// WARN: branch and link relocation: R_ARM_CALL to non STT_FUNC symbol: sym interworking not performed; consider using directive '.type sym, %function' to give symbol type STT_FUNC if interworking between ARM and Thumb is required
  blx sym
.thumb
thumb_caller:
  b sym
  bl sym
  blx sym
// WARN: branch and link relocation: R_ARM_THM_CALL to non STT_FUNC symbol: sym interworking not performed; consider using directive '.type sym, %function' to give symbol type STT_FUNC if interworking between ARM and Thumb is required

// CHECK: 00021000 <arm_caller>:
// CHECK-NEXT:    21000: b       0x13000
// CHECK-NEXT:    21004: bl      0x13000
// CHECK-NEXT:    21008: blx     0x13000

// CHECK: 0002100c <thumb_caller>:
// CHECK-NEXT:    2100c: b.w     0x13000
// CHECK-NEXT:    21010: bl      0x13000
// CHECK-NEXT:    21014: blx     0x13004