[NFC][analyzer][docs] Crosslink MallocChecker's ownership attributes (#121939)
[llvm-project.git] / llvm / test / MC / ARM / pcrel-ldr-relocs.s
blob4a182be128d54507ad924bd6cb7d619c18d02a48
1 @ RUN: llvm-mc -filetype=obj -triple=armv7 %s -o %t
2 @ RUN: llvm-readelf -r %t | FileCheck %s --check-prefix=ARM
3 @ RUN: llvm-objdump -d --triple=armv7 %t | FileCheck %s --check-prefix=ARM_ADDEND
4 @ RUN: llvm-mc -filetype=obj -triple=thumbv7 %s -o %t
5 @ RUN: llvm-readelf -r %t | FileCheck %s --check-prefix=THUMB
6 @ RUN: llvm-objdump -d --triple=thumbv7 %t | FileCheck %s --check-prefix=THUMB_ADDEND
7 @ RUN: llvm-mc -filetype=obj -triple=armebv7 %s -o %t
8 @ RUN: llvm-readelf -r %t | FileCheck %s --check-prefix=ARM
9 @ RUN: llvm-objdump -d --triple=armebv7 %t | FileCheck %s --check-prefix=ARM_ADDEND
10 @ RUN: llvm-mc -filetype=obj -triple=thumbebv7 %s -o %t
11 @ RUN: llvm-readelf -r %t | FileCheck %s --check-prefix=THUMB
12 @ RUN: llvm-objdump -d --triple=thumbebv7 %t | FileCheck %s --check-prefix=THUMB_ADDEND
14 @ ARM: R_ARM_LDR_PC_G0
15 @ ARM: R_ARM_LDR_PC_G0
16 @ ARM: R_ARM_LDR_PC_G0
17 @ ARM: R_ARM_LDR_PC_G0
18 @ ARM_ADDEND: r0, [pc, #-0x8]
19 @ ARM_ADDEND: r0, [pc, #-0x8]
20 @ ARM_ADDEND: r0, [pc, #-0x10]
21 @ ARM_ADDEND: r0, [pc]
23 @ THUMB: R_ARM_THM_PC12
24 @ THUMB: R_ARM_THM_PC12
25 @ THUMB: R_ARM_THM_PC12
26 @ THUMB: R_ARM_THM_PC12
27 @ THUMB_ADDEND: r0, [pc, #-0x4]
28 @ THUMB_ADDEND: r0, [pc, #-0x4]
29 @ THUMB_ADDEND: r0, [pc, #-0xc]
30 @ THUMB_ADDEND: r0, [pc, #0x4]
32 .section .text.bar, "ax"
33 .balign 4
34 .global bar
35 .type bar, %function
36 bar:
37 ldr r0, foo1 @ arm_ldst_pcrel_12 / t2_ldst_pcrel_12
38 ldrb r0, foo1 @ arm_ldst_pcrel_12 / t2_ldst_pcrel_12
39 ldr r0, foo2-8 @ arm_ldst_pcrel_12 / t2_ldst_pcrel_12
40 ldrb r0, foo1+8 @ arm_ldst_pcrel_12 / t2_ldst_pcrel_12
41 bx lr
43 .section .data.foo, "a", %progbits
44 .balign 4
45 .global foo1
46 .global foo2
47 foo1:
48 .word 0x11223344, 0x55667788
49 foo2:
50 .word 0x99aabbcc, 0xddeeff00