mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-21 02:59:15 +00:00
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:
parent
a99c119e05
commit
7d41dd85c3
@ -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)));
|
||||
|
Loading…
Reference in New Issue
Block a user