Browse Source

* initialize full 64 bit of 64 bit static/global register variables

git-svn-id: trunk@4610 -
Jonas Maebe 19 years ago
parent
commit
8637bddf72
1 changed files with 9 additions and 2 deletions
  1. 9 2
      compiler/ncgutil.pas

+ 9 - 2
compiler/ncgutil.pas

@@ -989,8 +989,15 @@ implementation
          begin
            case tglobalvarsym(p).localloc.loc of
              LOC_CREGISTER :
-               cg.a_load_const_reg(TAsmList(arg),reg_cgsize(tglobalvarsym(p).localloc.register),0,
-                   tglobalvarsym(p).localloc.register);
+               begin
+{$ifndef cpu64bit}
+                 if (tglobalvarsym(p).localloc.size in [OS_64,OS_S64]) then
+                   cg64.a_load64_const_reg(TAsmList(arg),0,tglobalvarsym(p).localloc.register64)
+                 else
+{$endif not cpu64bit}
+                   cg.a_load_const_reg(TAsmList(arg),reg_cgsize(tglobalvarsym(p).localloc.register),0,
+                       tglobalvarsym(p).localloc.register);
+               end;
              LOC_REFERENCE : ;
              LOC_CMMREGISTER :
                { clear the whole register }