brintos

brintos / llvm-project-archived public Read only

0
0
Text · 857 B · adef746 Raw
27 lines · plain
1@ RUN: llvm-mc -filetype=obj --triple=thumbv6m-none-eabi %s -o %t2@ RUN: llvm-readelf -r %t | FileCheck %s --check-prefix=RELOC3@ RUN: llvm-objdump -d --triple=thumbv6m-none-eabi %t | FileCheck %s --check-prefix=ADDEND4 5    .section .text._func1, "ax"6 7    .balign 48    .global _func19    .type _func1, %function10_func1:11    adr r0, _func212@ RELOC: R_ARM_THM_PC813    bx lr14 15// Checking the encoding only, as the disassembly is not quite correct here.16//00000000 <_func1>:17//       0: a0ff         	adr	r0, #1020 <_func1+0x103>18 19// Thumb16 encoding supports only adding of the encoded immediate (not20// subtracting, see [Arm ARM]), therefore sign change is required if the pcrel21// offset is negative. This makes the calculation of the addend for22// R_ARM_THM_PC8 more complex, for details see [ELF for the Arm 32-bit23// architecture].24 25@ ADDEND: a0ff adr26 27