* Get/Unget expilit registers to be re-examined

This commit is contained in:
mazen 2002-10-12 19:03:23 +00:00
parent 1e9543367e
commit b845456453

View File

@ -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); else result := inherited GetExplicitRegisterInt(list,reg);
end; 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 Revision 1.3 2002-10-12 19:03:23 mazen
*** empty log message *** * Get/Unget expilit registers to be re-examined
} }