Переглянути джерело

* fix newra cycle for i386

peter 22 роки тому
батько
коміт
a71427cf2c
2 змінених файлів з 14 додано та 8 видалено
  1. 6 3
      compiler/i386/cgcpu.pas
  2. 8 5
      compiler/x86/cgx86.pas

+ 6 - 3
compiler/i386/cgcpu.pas

@@ -116,7 +116,7 @@ unit cgcpu;
           OP_NEG :
           OP_NEG :
             begin
             begin
               if (regsrc.reglo.number<>regdst.reglo.number) then
               if (regsrc.reglo.number<>regdst.reglo.number) then
-                a_load64_reg_reg(list,regsrc,regdst);
+                a_load64_reg_reg(list,regsrc,regdst{$ifdef newra},false{$endif});
               list.concat(taicpu.op_reg(A_NOT,S_L,regdst.reghi));
               list.concat(taicpu.op_reg(A_NOT,S_L,regdst.reghi));
               list.concat(taicpu.op_reg(A_NEG,S_L,regdst.reglo));
               list.concat(taicpu.op_reg(A_NEG,S_L,regdst.reglo));
               list.concat(taicpu.op_const_reg(A_SBB,S_L,aword(-1),regdst.reghi));
               list.concat(taicpu.op_const_reg(A_SBB,S_L,aword(-1),regdst.reghi));
@@ -125,7 +125,7 @@ unit cgcpu;
           OP_NOT :
           OP_NOT :
             begin
             begin
               if (regsrc.reglo.number<>regdst.reglo.number) then
               if (regsrc.reglo.number<>regdst.reglo.number) then
-                a_load64_reg_reg(list,regsrc,regdst);
+                a_load64_reg_reg(list,regsrc,regdst{$ifdef newra},false{$endif});
               list.concat(taicpu.op_reg(A_NOT,S_L,regdst.reghi));
               list.concat(taicpu.op_reg(A_NOT,S_L,regdst.reghi));
               list.concat(taicpu.op_reg(A_NOT,S_L,regdst.reglo));
               list.concat(taicpu.op_reg(A_NOT,S_L,regdst.reglo));
               exit;
               exit;
@@ -193,7 +193,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.35  2003-06-03 21:11:09  peter
+  Revision 1.36  2003-06-12 18:31:18  peter
+    * fix newra cycle for i386
+
+  Revision 1.35  2003/06/03 21:11:09  peter
     * cg.a_load_* get a from and to size specifier
     * cg.a_load_* get a from and to size specifier
     * makeregsize only accepts newregister
     * makeregsize only accepts newregister
     * i386 uses generic tcgnotnode,tcgunaryminus
     * i386 uses generic tcgnotnode,tcgunaryminus

+ 8 - 5
compiler/x86/cgx86.pas

@@ -403,7 +403,7 @@ unit cgx86;
               else
               else
                 pushsize:=OS_32;
                 pushsize:=OS_32;
             {$ifdef newra}
             {$ifdef newra}
-              tmpreg:=rg.getregisterint(list,pushsize)
+              tmpreg:=rg.getregisterint(list,pushsize);
             {$else}
             {$else}
               tmpreg:=get_scratch_reg_int(list,pushsize);
               tmpreg:=get_scratch_reg_int(list,pushsize);
             {$endif}
             {$endif}
@@ -1186,10 +1186,10 @@ unit cgx86;
                 end;
                 end;
               dec(len,copysize);
               dec(len,copysize);
               r:=rg.getregisterint(list,cgsize);
               r:=rg.getregisterint(list,cgsize);
-              a_load_ref_reg(list,cgsize,srcref,r);
+              a_load_ref_reg(list,cgsize,cgsize,srcref,r);
               if (len=0) and delsource then
               if (len=0) and delsource then
                 reference_release(list,source);
                 reference_release(list,source);
-              a_load_reg_ref(list,cgsize,r,dstref);
+              a_load_reg_ref(list,cgsize,cgsize,r,dstref);
               inc(srcref.offset,copysize);
               inc(srcref.offset,copysize);
               inc(dstref.offset,copysize);
               inc(dstref.offset,copysize);
               rg.ungetregisterint(list,r);
               rg.ungetregisterint(list,r);
@@ -1201,7 +1201,7 @@ unit cgx86;
           a_loadaddr_ref_reg(list,dest,destreg);
           a_loadaddr_ref_reg(list,dest,destreg);
           srcreg:=rg.getexplicitregisterint(list,NR_ESI);
           srcreg:=rg.getexplicitregisterint(list,NR_ESI);
           if loadref then
           if loadref then
-            a_load_ref_reg(list,OS_ADDR,source,srcreg)
+            a_load_ref_reg(list,OS_ADDR,OS_ADDR,source,srcreg)
           else
           else
             begin
             begin
               a_loadaddr_ref_reg(list,source,srcreg);
               a_loadaddr_ref_reg(list,source,srcreg);
@@ -1932,7 +1932,10 @@ unit cgx86;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.53  2003-06-07 10:24:10  peter
+  Revision 1.54  2003-06-12 18:31:18  peter
+    * fix newra cycle for i386
+
+  Revision 1.53  2003/06/07 10:24:10  peter
     * fixed copyvaluepara for left-to-right pushing
     * fixed copyvaluepara for left-to-right pushing
 
 
   Revision 1.52  2003/06/07 10:06:55  jonas
   Revision 1.52  2003/06/07 10:06:55  jonas