Skip to content
Snippets Groups Projects
Commit 72490e0e authored by Clark Coleman's avatar Clark Coleman
Browse files

Fix IP-relative static mem operands by adding the length of the instruction to the offset.

parent 836322ce
Branches
No related tags found
1 merge request!16Move_globals fixes
......@@ -202,7 +202,7 @@ no operands for eflags or mxcsr?
if( the_arg.isPcrel() ) // (the_arg.ArgType&0xFFFF0000) == (MEMORY_TYPE + RELATIVE_))
{
assert(length!=0);// we need the length in this case.
operand.mem.disp=the_arg.getMemoryDisplacement(); // the_arg.Memory.Displacement+length;
operand.mem.disp=the_arg.getMemoryDisplacement() + length; // the_arg.Memory.Displacement+length;
#if 1
// Imitate IDA Pro: IP-relative static memop is relative to CS segment register.
this->SegReg = STARS_x86_R_cs;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment