* when adding OPR_LOCAL with OPR_REFERENCE in tx86intreader.AddReferences, add

the offsets correctly:
    1) localconstoffset is added with constoffset
    2) localsymofs is added with ref.offset

git-svn-id: trunk@38470 -
This commit is contained in:
nickysn 2018-03-09 14:17:19 +00:00
parent ba97e919e6
commit 77c782c89b

View File

@ -889,6 +889,7 @@ Unit Rax86int;
Message(asmr_e_multiple_index);
end;
Inc(tmplocal.localconstoffset,dest.opr.constoffset);
Inc(tmplocal.localsymofs,dest.opr.ref.offset);
segreg:=dest.opr.ref.segment;
dest.opr:=tmplocal;
if segreg<>NR_NO then
@ -928,7 +929,7 @@ Unit Rax86int;
Message(asmr_e_multiple_index);
end;
Inc(dest.opr.localconstoffset,src.opr.constoffset);
Inc(dest.opr.localsymofs,src.opr.constoffset);
Inc(dest.opr.localsymofs,src.opr.ref.offset);
if src.opr.ref.segment<>NR_NO then
SetSegmentOverride(dest,src.opr.ref.segment);
end;