forked from OSchip/llvm-project
[X86] Teach disassembler to use %eip instead of %rip when 0x67 prefix is used on a rip-relative address.
llvm-svn: 335413
This commit is contained in:
parent
68d64e3859
commit
2545529034
|
@ -794,7 +794,9 @@ static bool translateRMMemory(MCInst &mcInst, InternalInstruction &insn,
|
|||
tryAddingPcLoadReferenceComment(insn.startLocation +
|
||||
insn.displacementOffset,
|
||||
insn.displacement + pcrel, Dis);
|
||||
baseReg = MCOperand::createReg(X86::RIP); // Section 2.2.1.6
|
||||
// Section 2.2.1.6
|
||||
baseReg = MCOperand::createReg(insn.addressSize == 4 ? X86::EIP :
|
||||
X86::RIP);
|
||||
}
|
||||
else
|
||||
baseReg = MCOperand::createReg(0);
|
||||
|
|
|
@ -588,3 +588,7 @@
|
|||
# Make sure we ignore EVEX.X when modrm.rm encodes a k-register.
|
||||
#CHECK: vpmovm2b %k0, %xmm0
|
||||
0x62,0xb2,0x7e,0x08,0x28,0xc0
|
||||
|
||||
# 0x67 prefix prints %eip instead of %rip
|
||||
#CHECK: addb %al, (%eip)
|
||||
0x67,0x00,0x05,0x00,0x00,0x00,0x00
|
||||
|
|
Loading…
Reference in New Issue