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 

llvm-svn: 155074
This commit is contained in:
Kevin Enderby 2012-04-18 23:12:11 +00:00
parent a99c119e05
commit 7d41dd85c3

View File

@ -322,7 +322,12 @@ static void translateImmediate(MCInst &mcInst, uint64_t immediate,
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 @@ static void translateImmediate(MCInst &mcInst, uint64_t immediate,
}
}
bool isBranch = false;
uint64_t pcrel = 0;
switch (type) {
case TYPE_XMM128:
mcInst.addOperand(MCOperand::CreateReg(X86::XMM0 + (immediate >> 4)));