]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/ELF/arm-blx-v4t.s
Vendor import of lld trunk r338150:
[FreeBSD/FreeBSD.git] / test / ELF / arm-blx-v4t.s
1 // REQUIRES: arm
2 // RUN: llvm-mc -filetype=obj -triple=arm-none-linux-gnueabi %s -o %t
3 // RUN: ld.lld %t -o /dev/null 2>&1 | FileCheck %s
4
5 // On Arm v4t there is no blx instruction so all interworking must go via
6 // a thunk. At present we don't support v4t so we give a warning for unsupported
7 // features.
8
9 // CHECK: warning: lld uses blx instruction, no object with architecture supporting feature detected.
10 // CHECK-NEXT: warning: lld uses extended branch encoding, no object with architecture supporting feature detected.
11 // CHECK-NEXT: warning: lld may use movt/movw, no object with architecture supporting feature detected.
12
13  .text
14  .syntax unified
15  .cpu   arm7tdmi
16  .eabi_attribute        6, 2    @ Tag_CPU_arch
17  .arm
18  .globl _start
19  .type   _start,%function
20  .p2align       2
21 _start:
22   bl thumbfunc
23   bx lr
24
25  .thumb
26  .section .text.2, "ax", %progbits
27  .globl thumbfunc
28  .type thumbfunc,%function
29 thumbfunc:
30  bx lr