Skip to content
Snippets Groups Projects
Commit 36124864 authored by Jason Hiser's avatar Jason Hiser :tractor:
Browse files

Apply patch to support abs modifier to be respected

Not sure why patch cannot be in master and/or a release.
parent e1547852
No related branches found
No related tags found
No related merge requests found
......@@ -397,11 +397,13 @@ void X86MCCodeEmitter::EmitMemModRMByte(const MCInst &MI, unsigned Op,
unsigned int KsError;
bool RIP_rel = false;
/*
// do we need x64 RIP relative encoding?
if (BaseReg == 0 && is64BitMode(STI) && IndexReg.getReg() == 0 && Disp.isImm()) {
if (ABS_SUB(MI.getAddress(), (uint64_t)Disp.getImm()) < 2 * (1UL << 30))
RIP_rel = true;
}
*/
// Handle %rip relative addressing.
if (RIP_rel || BaseReg == X86::RIP) { // [disp32+RIP] in X86-64 mode
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment