46 lines · plain
1# Test v7 Thumb features for mixed Arm/Thumb targets2#3# RUN: llvm-mc -triple=thumbv7-linux-gnueabi -arm-add-build-attributes -filetype=obj -o %t_thumbv7.o %s4# RUN: llvm-objdump -r %t_thumbv7.o | FileCheck --check-prefix=CHECK-TYPE %s5# RUN: llvm-objdump --disassemble %t_thumbv7.o | FileCheck --check-prefix=CHECK-INSTR %s6# RUN: llvm-jitlink -noexec -slab-address 0x76ff0000 -slab-allocate 10Kb \7# RUN: -slab-page-size 4096 -abs external_func=0x76bbe880 \8# RUN: -check %s %t_thumbv7.o9 10 11 .text12 .syntax unified13 14# CHECK-TYPE: {{[0-9a-f]+}} R_ARM_THM_CALL call_target_arm15# CHECK-INSTR: <call_site>:16# CHECK-INSTR: f7ff fffe bl17# We decode the operand with index 2, because bl generates two leading implicit18# predicate operands that we have to skip in order to decode the call_target operand19# jitlink-check: decode_operand(call_site, 2) = call_target_arm - next_pc(call_site)20 .globl call_site21 .type call_site,%function22 .p2align 123 .code 1624 .thumb_func25call_site:26 bl call_target_arm27 .size call_site, .-call_site28 29 .globl call_target_arm30 .type call_target_arm,%function31 .p2align 232 .code 3233call_target_arm:34 bx lr35 .size call_target_arm, .-call_target_arm36 37# Empty main function for jitlink to be happy38 .globl main39 .type main,%function40 .p2align 141 .code 1642 .thumb_func43main:44 bx lr45 .size main, .-main46