1# Test v7 Arm features 2# 3# RUN: llvm-mc -triple=armv7-linux-gnueabi -arm-add-build-attributes -filetype=obj -o %t_armv7.o %s 4# RUN: llvm-objdump -r %t_armv7.o | FileCheck --check-prefix=CHECK-TYPE %s 5# RUN: llvm-objdump --disassemble %t_armv7.o | FileCheck --check-prefix=CHECK-INSTR %s 6# RUN: llvm-jitlink -noexec -slab-address 0x76ff0000 -slab-allocate 10Kb \ 7# RUN: -slab-page-size 4096 -abs data_symbol=0x00001234 -check %s %t_armv7.o 8# 9# RUN: llvm-mc -triple=armv9-linux-gnueabi -arm-add-build-attributes -filetype=obj -o %t_armv9.o %s 10# RUN: llvm-objdump -r %t_armv9.o | FileCheck --check-prefix=CHECK-TYPE %s 11# RUN: llvm-objdump --disassemble %t_armv9.o | FileCheck --check-prefix=CHECK-INSTR %s 12# RUN: llvm-jitlink -noexec -slab-address 0x76ff0000 -slab-allocate 10Kb \ 13# RUN: -slab-page-size 4096 -abs data_symbol=0x00001234 -check %s %t_armv9.o 14 15 16 .text 17 .syntax unified 18 19# CHECK-TYPE: {{[0-9a-f]+}} R_ARM_MOVW_ABS_NC data_symbol 20# CHECK-INSTR: <movw>: 21# CHECK-INSTR: e3000000 movw r0, #0x0 22# jitlink-check: decode_operand(movw, 1) = data_symbol[15:0] 23 .globl movw 24 .type movw,%function 25 .p2align 2 26movw: 27 movw r0, :lower16:data_symbol 28 .size movw, .-movw 29 30# CHECK-TYPE: {{[0-9a-f]+}} R_ARM_MOVT_ABS data_symbol 31# CHECK-INSTR: <movt>: 32# CHECK-INSTR: e3400000 movt r0, #0x0 33# We decode the operand with index 2, because movt generates one leading implicit 34# predicate operand that we have to skip in order to decode the data_symbol operand 35# jitlink-check: decode_operand(movt, 2) = data_symbol[31:16] 36 .globl movt 37 .type movt,%function 38 .p2align 2 39movt: 40 movt r0, :upper16:data_symbol 41 .size movt, .-movt 42 43# Empty main function for jitlink to be happy 44 .globl main 45 .type main,%function 46 .p2align 2 47main: 48 bx lr 49 .size main, .-main 50