summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2012-02-23 18:18:17 +0000
committerKevin Enderby <enderby@apple.com>2012-02-23 18:18:17 +0000
commit6fbcd8d4397593e4992545527bf8b77b147360d5 (patch)
treec2e6b7d4f512454dfddd7067ff38cf230582884b /llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h
parentd5d166d4d45fbae98e17ca23cd348293b48dfbf0 (diff)
downloadbcm5719-llvm-6fbcd8d4397593e4992545527bf8b77b147360d5.tar.gz
bcm5719-llvm-6fbcd8d4397593e4992545527bf8b77b147360d5.zip
Updated the llvm-mc disassembler C API to support for the X86 target.
rdar://10873652 As part of this I updated the llvm-mc disassembler C API to always call the SymbolLookUp call back even if there is no getOpInfo call back. If there is a getOpInfo call back that is tried first and then if that gets no information then the SymbolLookUp is called. I also made the code more robust by memset(3)'ing to zero the LLVMOpInfo1 struct before then setting SymbolicOp.Value before for the call to getOpInfo. And also don't use any values from the LLVMOpInfo1 struct if getOpInfo returns 0. And also don't use any of the ReferenceType or ReferenceName values from SymbolLookUp if it returns NULL. rdar://10873563 and rdar://10873683 For the X86 target also fixed bugs so the annotations get printed. Also fixed a few places in the ARM target that was not producing symbolic operands for some instructions. rdar://10878166 llvm-svn: 151267
Diffstat (limited to 'llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h')
-rw-r--r--llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h b/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h
index 7caee73268d..fae309b45d0 100644
--- a/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h
+++ b/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h
@@ -459,6 +459,11 @@ struct InternalInstruction {
uint8_t addressSize;
uint8_t displacementSize;
uint8_t immediateSize;
+
+ /* Offsets from the start of the instruction to the pieces of data, which is
+ needed to find relocation entries for adding symbolic operands */
+ uint8_t displacementOffset;
+ uint8_t immediateOffset;
/* opcode state */
OpenPOWER on IntegriCloud