Browse Source

* Get/Unget expilit registers to be re-examined

mazen 23 years ago
parent
commit
b845456453
1 changed files with 7 additions and 9 deletions
  1. 7 9
      compiler/sparc/rgcpu.pas

+ 7 - 9
compiler/sparc/rgcpu.pas

@@ -2,9 +2,6 @@
     $Id$
     $Id$
     Copyright (c) 1998-2002 by Florian Klaempfl
     Copyright (c) 1998-2002 by Florian Klaempfl
 
 
-    This unit implements the i386 specific class for the register
-    allocator
-
     This program is free software; you can redistribute it and/or modify
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2 of the License, or
     the Free Software Foundation; either version 2 of the License, or
@@ -21,6 +18,7 @@
 
 
  ****************************************************************************}
  ****************************************************************************}
 unit rgcpu;
 unit rgcpu;
+{ This unit implements the processor specific class for the register allocator}
 {$INCLUDE fpcdefs.inc}
 {$INCLUDE fpcdefs.inc}
 interface
 interface
 uses
 uses
@@ -40,17 +38,17 @@ uses
   cgobj;
   cgobj;
 function trgcpu.GetExplicitRegisterInt(list:taasmoutput;reg:tregister):tregister;
 function trgcpu.GetExplicitRegisterInt(list:taasmoutput;reg:tregister):tregister;
   begin
   begin
-    if reg = R_i0
+    if reg in [R_O7,R_I7]
     then
     then
       begin
       begin
         cg.a_reg_alloc(list,Reg);
         cg.a_reg_alloc(list,Reg);
         result := Reg;
         result := Reg;
       end
       end
-        else result := inherited GetExplicitRegisterInt(list,reg);
-      end;
+    else result := inherited GetExplicitRegisterInt(list,reg);
+  end;
 procedure trgcpu.UngetregisterInt(list: taasmoutput; reg: tregister);
 procedure trgcpu.UngetregisterInt(list: taasmoutput; reg: tregister);
   begin
   begin
-    if reg = R_i0
+    if reg in [R_O7,R_I7]
     then
     then
       cg.a_reg_dealloc(list,reg)
       cg.a_reg_dealloc(list,reg)
     else
     else
@@ -61,7 +59,7 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.2  2002-10-11 13:35:14  mazen
-  *** empty log message ***
+  Revision 1.3  2002-10-12 19:03:23  mazen
+  * Get/Unget expilit registers to be re-examined
 
 
 }
 }