Forráskód Böngészése

Fix around 30 tests by using a volatile register for restoring the stack pointer

m68k/cgcpu.pas, tcg68k.g_proc_exit:
  * use A0 (which is a volatile register) instead of A3 (which is not) to restore the stack pointer

git-svn-id: trunk@25663 -
svenbarth 11 éve
szülő
commit
b1d79494dd
1 módosított fájl, 3 hozzáadás és 2 törlés
  1. 3 2
      compiler/m68k/cgcpu.pas

+ 3 - 2
compiler/m68k/cgcpu.pas

@@ -1778,8 +1778,9 @@ unit cgcpu;
                     { point to nowhere!                                   }
 
                     { save the PC counter (pop it from the stack)         }
-                    //hregister:=cg.getaddressregister(list);
-                    hregister:=NR_A3;
+                    { use A0 for this which is defined as a scratch       }
+                    { register                                            }
+                    hregister:=NR_A0;
                     cg.a_reg_alloc(list,hregister);
                     reference_reset_base(ref,NR_STACK_POINTER_REG,0,4);
                     ref.direction:=dir_inc;