ソースを参照

* use tabstractprocdef.is_addressonly to determine whether a procvar is
stored in more than one register (has a self and a code pointer), instead
of assuming it always occupies more than one register if the original
procdef had a self pointer (can be different when getting the address
of a static class procedure)

git-svn-id: trunk@34976 -

Jonas Maebe 8 年 前
コミット
b2e99da3e6
1 ファイル変更3 行追加1 行削除
  1. 3 1
      compiler/llvm/nllvmld.pas

+ 3 - 1
compiler/llvm/nllvmld.pas

@@ -86,7 +86,9 @@ procedure tllvmloadnode.pass_generate_code;
             a single memory location, as we don't use the registerhi/register
             location hack for llvm (llvm will put it back into registers itself)
           }
-          if assigned(left) then
+          if assigned(left) and
+            (resultdef.typ in [symconst.procdef,procvardef]) and
+             not tabstractprocdef(resultdef).is_addressonly then
             begin
               pvdef:=tprocvardef(procdef.getcopyas(procvardef,pc_normal));
               { on little endian, location.register contains proc and