mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 01:24:30 +00:00
Adding support for printing operands symbolically to llvm's public 'C'
disassembler API. Hooked this up to the ARM target so such tools as Darwin's otool(1) can now print things like branch targets for example this: blx _puts instead of this: blx #-36 And even print the expression encoded in the Mach-O relocation entried for things like this: movt r0, :upper16:((_foo-_bar)+1234) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129284 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -422,6 +422,10 @@ bool ARMDisassembler::getInstruction(MCInst &MI,
|
||||
if (!Builder)
|
||||
return false;
|
||||
|
||||
Builder->setupBuilderForSymbolicDisassembly(getLLVMOpInfoCallback(),
|
||||
getDisInfoBlock(), getMCContext(),
|
||||
Address);
|
||||
|
||||
if (!Builder->Build(MI, insn))
|
||||
return false;
|
||||
|
||||
@ -504,6 +508,10 @@ bool ThumbDisassembler::getInstruction(MCInst &MI,
|
||||
|
||||
Builder->SetSession(const_cast<Session *>(&SO));
|
||||
|
||||
Builder->setupBuilderForSymbolicDisassembly(getLLVMOpInfoCallback(),
|
||||
getDisInfoBlock(), getMCContext(),
|
||||
Address);
|
||||
|
||||
if (!Builder->Build(MI, insn))
|
||||
return false;
|
||||
|
||||
|
Reference in New Issue
Block a user