mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 23:24:59 +00:00
Plumb in the ARM thumb symbolizer in llvm-objdump’s Mach-O disassembler and
add the code and test cases for 32-bit ARM symbolizer. Also fixed the printing of data in code as it was not using the table correctly and needed to fix one of the test cases too. This will break lld’s test/mach-o/arm-interworking-movw.yaml till the tweak for that is made. Which I’ll be committing immediately after this commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221470 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
BIN
test/tools/llvm-objdump/ARM/Inputs/hello.exe.macho-arm
Executable file
BIN
test/tools/llvm-objdump/ARM/Inputs/hello.exe.macho-arm
Executable file
Binary file not shown.
BIN
test/tools/llvm-objdump/ARM/Inputs/hello.obj.macho-arm
Normal file
BIN
test/tools/llvm-objdump/ARM/Inputs/hello.obj.macho-arm
Normal file
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
// RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex %p/Inputs/hello.obj.macho-arm | FileCheck %s -check-prefix=OBJ
|
||||
// RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex %p/Inputs/hello.exe.macho-arm | FileCheck %s -check-prefix=EXE
|
||||
|
||||
OBJ: 00000006 movw r3, :lower16:((54-14)-4)
|
||||
OBJ: 0000000a movt r3, :upper16:((54-14)-4)
|
||||
OBJ: 00000024 bl _printf
|
||||
|
||||
EXE: 0000bfa8 blx 0xbffc @ symbol stub for: _printf
|
15
test/tools/llvm-objdump/ARM/macho-symbolized-subtractor.test
Normal file
15
test/tools/llvm-objdump/ARM/macho-symbolized-subtractor.test
Normal file
@@ -0,0 +1,15 @@
|
||||
# RUN: llvm-mc < %s -triple armv7-apple-darwin -filetype=obj | llvm-objdump -m -d - | FileCheck %s
|
||||
.thumb
|
||||
.thumb_func _t
|
||||
_t:
|
||||
movw r3, :lower16:(Str-(PCinst+4))
|
||||
movt r3, :upper16:(Str-(PCinst+4))
|
||||
.thumb_func PCinst
|
||||
PCinst:
|
||||
add r3, pc
|
||||
|
||||
.section __TEXT,__cstring,cstring_literals
|
||||
Str:
|
||||
.asciz "Hello world\n"
|
||||
# CHECK: movw r3, :lower16:((Str-PCinst)-4)
|
||||
# CHECK: movt r3, :upper16:((Str-PCinst)-4)
|
Reference in New Issue
Block a user