Browse Source

* 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 -

nickysn 7 years ago
parent
commit
77c782c89b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      compiler/x86/rax86int.pas

+ 2 - 1
compiler/x86/rax86int.pas

@@ -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;