Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • third-party-mirrors/keystone
1 result
Show changes
Commits on Source (1)
...@@ -397,11 +397,13 @@ void X86MCCodeEmitter::EmitMemModRMByte(const MCInst &MI, unsigned Op, ...@@ -397,11 +397,13 @@ void X86MCCodeEmitter::EmitMemModRMByte(const MCInst &MI, unsigned Op,
unsigned int KsError; unsigned int KsError;
bool RIP_rel = false; bool RIP_rel = false;
/*
// do we need x64 RIP relative encoding? // do we need x64 RIP relative encoding?
if (BaseReg == 0 && is64BitMode(STI) && IndexReg.getReg() == 0 && Disp.isImm()) { if (BaseReg == 0 && is64BitMode(STI) && IndexReg.getReg() == 0 && Disp.isImm()) {
if (ABS_SUB(MI.getAddress(), (uint64_t)Disp.getImm()) < 2 * (1UL << 30)) if (ABS_SUB(MI.getAddress(), (uint64_t)Disp.getImm()) < 2 * (1UL << 30))
RIP_rel = true; RIP_rel = true;
} }
*/
// Handle %rip relative addressing. // Handle %rip relative addressing.
if (RIP_rel || BaseReg == X86::RIP) { // [disp32+RIP] in X86-64 mode if (RIP_rel || BaseReg == X86::RIP) { // [disp32+RIP] in X86-64 mode
......