Browse Source

* set shiftval to 0 if we convert a reference to a register paraloc,
as the reference overlaid the shiftval field and hence it could
have any value

git-svn-id: trunk@34303 -

Jonas Maebe 9 years ago
parent
commit
8760a6fbf8
1 changed files with 3 additions and 0 deletions
  1. 3 0
      compiler/llvm/llvmpara.pas

+ 3 - 0
compiler/llvm/llvmpara.pas

@@ -123,6 +123,9 @@ unit llvmpara;
                     end;
                     end;
                     paraloc^.register:=hlcg.getregisterfordef(list,paraloc^.def);
                     paraloc^.register:=hlcg.getregisterfordef(list,paraloc^.def);
                     paraloc^.llvmvalueloc:=true;
                     paraloc^.llvmvalueloc:=true;
+                    { paraloc^.reference overlaid this field, so zero it now
+                      that we turned it into a register location }
+                    paraloc^.shiftval:=0;
                   end;
                   end;
                 LOC_REGISTER,
                 LOC_REGISTER,
                 LOC_FPUREGISTER,
                 LOC_FPUREGISTER,