[llvm-commits] [llvm] r155074 - /llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp
Kevin Enderby
enderby at apple.com
Wed Apr 18 16:12:11 PDT 2012
Author: enderby
Date: Wed Apr 18 18:12:11 2012
New Revision: 155074
URL: http://llvm.org/viewvc/llvm-project?rev=155074&view=rev
Log:
Fixed the llvm-mv X86 disassembler so the 'C' API gets jumps properly
symbolicated. These have and operand type of TYPE_RELv which was not handled
as isBranch in translateImmediate() in X86Disassembler.cpp. rdar://11268426
Modified:
llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp
Modified: llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp?rev=155074&r1=155073&r2=155074&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp (original)
+++ llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp Wed Apr 18 18:12:11 2012
@@ -322,7 +322,12 @@
OperandType type = (OperandType)operand.type;
+ bool isBranch = false;
+ uint64_t pcrel = 0;
if (type == TYPE_RELv) {
+ isBranch = true;
+ pcrel = insn.startLocation +
+ insn.displacementOffset + insn.displacementSize;
switch (insn.displacementSize) {
default:
break;
@@ -373,8 +378,6 @@
}
}
- bool isBranch = false;
- uint64_t pcrel = 0;
switch (type) {
case TYPE_XMM128:
mcInst.addOperand(MCOperand::CreateReg(X86::XMM0 + (immediate >> 4)));
More information about the llvm-commits
mailing list