xref: /aosp_15_r20/external/llvm/test/MC/ARM/thumb-movwt-reloc.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker@ RUN: llvm-mc -triple thumbv8m.base-eabi -filetype asm -o - %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker@ RUN: llvm-mc -triple thumbv8m.base-eabi -filetype obj -o - %s | llvm-readobj -r \
3*9880d681SAndroid Build Coastguard Worker@ RUN:   | FileCheck -check-prefix CHECK-RELOCATIONS %s
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Worker	.syntax unified
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker	.type function,%function
8*9880d681SAndroid Build Coastguard Workerfunction:
9*9880d681SAndroid Build Coastguard Worker	bx lr
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Worker	.global external
12*9880d681SAndroid Build Coastguard Worker	.type external,%function
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Worker	.type test,%function
15*9880d681SAndroid Build Coastguard Workertest:
16*9880d681SAndroid Build Coastguard Worker	movw r0, :lower16:function
17*9880d681SAndroid Build Coastguard Worker	movt r0, :upper16:function
18*9880d681SAndroid Build Coastguard Worker
19*9880d681SAndroid Build Coastguard Worker@ CHECK-LABEL: test:
20*9880d681SAndroid Build Coastguard Worker@ CHECK: 	movw r0, :lower16:function
21*9880d681SAndroid Build Coastguard Worker@ CHECK: 	movt r0, :upper16:function
22*9880d681SAndroid Build Coastguard Worker
23*9880d681SAndroid Build Coastguard Worker@ CHECK-RELOCATIONS: Relocations [
24*9880d681SAndroid Build Coastguard Worker@ CHECK-RELOCATIONS:   0x2 R_ARM_THM_MOVW_ABS_NC function 0x0
25*9880d681SAndroid Build Coastguard Worker@ CHECK-RELOCATIONS:   0x6 R_ARM_THM_MOVT_ABS function 0x0
26*9880d681SAndroid Build Coastguard Worker@ CHECK-RELOCATIONS: ]
27*9880d681SAndroid Build Coastguard Worker
28