Browse Source

* To check the size of a register(s) corresponding to a variable it is needed to use localloc.size instead of def_cgsize(vardef).

git-svn-id: trunk@45834 -
yury 5 years ago
parent
commit
a258774ba9
1 changed files with 7 additions and 7 deletions
  1. 7 7
      compiler/ncgutil.pas

+ 7 - 7
compiler/ncgutil.pas

@@ -1157,21 +1157,21 @@ implementation
                       LOC_CREGISTER :
                         if (pi_has_label in current_procinfo.flags) then
 {$if defined(cpu64bitalu)}
-                          if def_cgsize(vardef) in [OS_128,OS_S128] then
+                          if localloc.size in [OS_128,OS_S128] then
                             begin
                               cg.a_reg_sync(list,localloc.register128.reglo);
                               cg.a_reg_sync(list,localloc.register128.reghi);
                             end
                           else
 {$elseif defined(cpu32bitalu)}
-                          if def_cgsize(vardef) in [OS_64,OS_S64] then
+                          if localloc.size in [OS_64,OS_S64] then
                             begin
                               cg.a_reg_sync(list,localloc.register64.reglo);
                               cg.a_reg_sync(list,localloc.register64.reghi);
                             end
                           else
 {$elseif defined(cpu16bitalu)}
-                          if def_cgsize(vardef) in [OS_64,OS_S64] then
+                          if localloc.size in [OS_64,OS_S64] then
                             begin
                               cg.a_reg_sync(list,localloc.register64.reglo);
                               cg.a_reg_sync(list,cg.GetNextReg(localloc.register64.reglo));
@@ -1179,14 +1179,14 @@ implementation
                               cg.a_reg_sync(list,cg.GetNextReg(localloc.register64.reghi));
                             end
                           else
-                          if def_cgsize(vardef) in [OS_32,OS_S32] then
+                          if localloc.size in [OS_32,OS_S32] then
                             begin
                               cg.a_reg_sync(list,localloc.register);
                               cg.a_reg_sync(list,cg.GetNextReg(localloc.register));
                             end
                           else
 {$elseif defined(cpu8bitalu)}
-                          if def_cgsize(vardef) in [OS_64,OS_S64] then
+                          if localloc.size in [OS_64,OS_S64] then
                             begin
                               cg.a_reg_sync(list,localloc.register64.reglo);
                               cg.a_reg_sync(list,cg.GetNextReg(localloc.register64.reglo));
@@ -1198,7 +1198,7 @@ implementation
                               cg.a_reg_sync(list,cg.GetNextReg(cg.GetNextReg(cg.GetNextReg(localloc.register64.reghi))));
                             end
                           else
-                          if def_cgsize(vardef) in [OS_32,OS_S32] then
+                          if localloc.size in [OS_32,OS_S32] then
                             begin
                               cg.a_reg_sync(list,localloc.register);
                               cg.a_reg_sync(list,cg.GetNextReg(localloc.register));
@@ -1206,7 +1206,7 @@ implementation
                               cg.a_reg_sync(list,cg.GetNextReg(cg.GetNextReg(cg.GetNextReg(localloc.register))));
                             end
                           else
-                          if def_cgsize(vardef) in [OS_16,OS_S16] then
+                          if localloc.size in [OS_16,OS_S16] then
                             begin
                               cg.a_reg_sync(list,localloc.register);
                               cg.a_reg_sync(list,cg.GetNextReg(localloc.register));