Ver código fonte

* Fix for tw10233 for all CPUs.

git-svn-id: trunk@10688 -
yury 17 anos atrás
pai
commit
e71d631c24

+ 2 - 4
compiler/arm/narmcnv.pas

@@ -198,10 +198,8 @@ implementation
            begin
               location_copy(location,left.location);
               newsize:=def_cgsize(resultdef);
-              { change of sign? Then we have to sign/zero-extend in }
-              { case of a loc_(c)register                           }
-              if (newsize<>left.location.size) and
-                 (location.loc in [LOC_REGISTER,LOC_CREGISTER]) then
+              { change of size/sign? Then we have to sign/zero-extend }
+              if (newsize<>left.location.size) then
                 location_force_reg(current_asmdata.CurrAsmList,location,newsize,true)
               else
                 location.size:=newsize;

+ 2 - 4
compiler/m68k/n68kcnv.pas

@@ -172,10 +172,8 @@ implementation
            begin
               location_copy(location,left.location);
               newsize:=def_cgsize(resultdef);
-              { change of sign? Then we have to sign/zero-extend in }
-              { case of a loc_(c)register                           }
-              if (newsize<>left.location.size) and
-                 (location.loc in [LOC_REGISTER,LOC_CREGISTER]) then
+              { change of size/sign? Then we have to sign/zero-extend }
+              if (newsize<>left.location.size) then
                 location_force_reg(current_asmdata.CurrAsmList,location,newsize,true)
               else
                 location.size:=newsize;

+ 2 - 4
compiler/ppcgen/ngppccnv.pas

@@ -93,10 +93,8 @@ implementation
            begin
               location_copy(location,left.location);
               newsize:=def_cgsize(resultdef);
-              { change of sign? Then we have to sign/zero-extend in }
-              { case of a loc_(c)register                           }
-              if (newsize<>left.location.size) and
-                 (location.loc in [LOC_REGISTER,LOC_CREGISTER]) then
+              { change of size/sign? Then we have to sign/zero-extend }
+              if (newsize<>left.location.size) then
                 location_force_reg(current_asmdata.CurrAsmList,location,newsize,true)
               else
                 location.size:=newsize;

+ 2 - 4
compiler/sparc/ncpucnv.pas

@@ -241,10 +241,8 @@ implementation
            begin
               location_copy(location,left.location);
               newsize:=def_cgsize(resultdef);
-              { change of sign? Then we have to sign/zero-extend in }
-              { case of a loc_(c)register                           }
-              if (newsize<>left.location.size) and
-                 (location.loc in [LOC_REGISTER,LOC_CREGISTER]) then
+              { change of size/sign? Then we have to sign/zero-extend }
+              if (newsize<>left.location.size) then
                 location_force_reg(current_asmdata.CurrAsmList,location,newsize,true)
               else
                 location.size:=newsize;

+ 2 - 4
compiler/x86/nx86cnv.pas

@@ -110,10 +110,8 @@ implementation
            begin
               location_copy(location,left.location);
               newsize:=def_cgsize(resultdef);
-              { change of sign? Then we have to sign/zero-extend in }
-              { case of a loc_(c)register                           }
-              if (newsize<>left.location.size) and
-                 (location.loc in [LOC_REGISTER,LOC_CREGISTER]) then
+              { change of size/sign? Then we have to sign/zero-extend }
+              if (newsize<>left.location.size) then
                 location_force_reg(current_asmdata.CurrAsmList,location,newsize,true)
               else
                 location.size:=newsize;