浏览代码

* fix subsetref/subsetreg support for int_to_real

git-svn-id: trunk@5511 -
Jonas Maebe 18 年之前
父节点
当前提交
3c26e1c40b
共有 2 个文件被更改,包括 4 次插入0 次删除
  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
           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
           LOC_REGISTER:
             begin

+ 2 - 0
compiler/powerpc64/nppccnv.pas

@@ -148,6 +148,8 @@ begin
     tg.Gettemp(current_asmdata.CurrAsmList, 8, tt_normal, disp2);
   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
     // the conversion algorithm does not modify the input register, so it can
     // be used for both LOC_REGISTER and LOC_CREGISTER