mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
ddd200c2a0
This follows other patches that changed printing immediate values of branch instructions to target addresses, see D76580 (x86), D76591 (PPC), D77853 (AArch64). As observing immediate values might sometimes be useful, they are printed as comments for branch instructions. // llvm-objdump -d output (before) 000200b4 <_start>: 200b4: ff ff ff fa blx #-4 <thumb> 000200b8 <thumb>: 200b8: ff f7 fc ef blx #-8 <_start> // llvm-objdump -d output (after) 000200b4 <_start>: 200b4: ff ff ff fa blx 0x200b8 <thumb> @ imm = #-4 000200b8 <thumb>: 200b8: ff f7 fc ef blx 0x200b4 <_start> @ imm = #-8 // GNU objdump -d. 000200b4 <_start>: 200b4: faffffff blx 200b8 <thumb> 000200b8 <thumb>: 200b8: f7ff effc blx 200b4 <_start> Differential Revision: https://reviews.llvm.org/D104701
20 lines
905 B
ArmAsm
20 lines
905 B
ArmAsm
@ RUN: not llvm-mc -triple thumbv6m-none-macho -filetype=obj -o /dev/null %s 2>&1 | FileCheck --check-prefix=CHECK-ERROR %s
|
|
@ RUN: llvm-mc -triple thumbv7m-none-macho -filetype=obj -o %t %s
|
|
@ RUN: llvm-objdump -d -r --triple=thumbv7m-none-macho %t | FileCheck --check-prefix=CHECK-MACHO %s
|
|
@ RUN: llvm-mc -triple thumbv7m-none-eabi -filetype=obj -o %t %s
|
|
@ RUN: llvm-objdump -d -r --triple=thumbv7m-none-eabi %t | FileCheck --check-prefix=CHECK-ELF %s
|
|
|
|
.global func1
|
|
_func1:
|
|
@ There is no MachO relocation for Thumb1's unconditional branch, so
|
|
@ this is unrepresentable. FIXME: I think ELF could represent this.
|
|
b _func2
|
|
|
|
@ CHECK-ERROR: unsupported relocation on symbol
|
|
|
|
@ CHECK-MACHO: ff f7 fe bf b.w {{.+}} @ imm = #-4
|
|
@ CHECK-MACHO-NEXT: ARM_THUMB_RELOC_BR22
|
|
|
|
@ CHECK-ELF: ff f7 fe bf b.w {{.+}} @ imm = #-4
|
|
@ CHECK-ELF-NEXT: R_ARM_THM_JUMP24 _func2
|