Browse Source

* fix subsetref/subsetreg support for int_to_real

git-svn-id: trunk@5511 -
Jonas Maebe 18 years ago
parent
commit
3c26e1c40b
2 changed files with 4 additions and 0 deletions
  1. 2 0
      compiler/powerpc/nppccnv.pas
  2. 2 0
      compiler/powerpc64/nppccnv.pas

+ 2 - 0
compiler/powerpc/nppccnv.pas

@@ -168,6 +168,8 @@ implementation
            is_64bitint(left.resultdef) then
            is_64bitint(left.resultdef) then
           internalerror(200110011);
           internalerror(200110011);
 
 
+        if not(left.location.loc in [LOC_REGISTER,LOC_CREGISTER,LOC_REFERENCE,LOC_CREFERENCE]) then
+          location_force_reg(current_asmdata.CurrAsmList,left.location,OS_INT,false);
         case left.location.loc of
         case left.location.loc of
           LOC_REGISTER:
           LOC_REGISTER:
             begin
             begin

+ 2 - 0
compiler/powerpc64/nppccnv.pas

@@ -148,6 +148,8 @@ begin
     tg.Gettemp(current_asmdata.CurrAsmList, 8, tt_normal, disp2);
     tg.Gettemp(current_asmdata.CurrAsmList, 8, tt_normal, disp2);
   end;
   end;
 
 
+  if not(left.location.loc in [LOC_REGISTER,LOC_CREGISTER,LOC_REFERENCE,LOC_CREFERENCE]) then
+    location_force_reg(current_asmdata.CurrAsmList,left.location,OS_INT,false);
   case left.location.loc of
   case left.location.loc of
     // the conversion algorithm does not modify the input register, so it can
     // the conversion algorithm does not modify the input register, so it can
     // be used for both LOC_REGISTER and LOC_CREGISTER
     // be used for both LOC_REGISTER and LOC_CREGISTER