mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 00:42:06 +02:00
* fixed alias/colouring > 255
This commit is contained in:
parent
f2ad2b9d19
commit
f44380e4a9
@ -172,7 +172,7 @@ unit rgobj;
|
||||
colour : Tsuperregister;
|
||||
movelist : Pmovelist;
|
||||
adjlist : Psuperregisterworklist;
|
||||
degree : byte;
|
||||
degree : TSuperregister;
|
||||
end;
|
||||
Preginfo=^TReginfo;
|
||||
|
||||
@ -553,7 +553,7 @@ implementation
|
||||
maxreginfo:=first_imaginary;
|
||||
maxreginfoinc:=16;
|
||||
for i:=0 to first_imaginary-1 do
|
||||
reginfo[i].degree:=255;
|
||||
reginfo[i].degree:=high(tsuperregister);
|
||||
worklist_moves:=Tlinkedlist.create;
|
||||
{ Usable registers }
|
||||
fillchar(usable_registers,sizeof(usable_registers),0);
|
||||
@ -947,8 +947,7 @@ implementation
|
||||
procedure trgobj.decrement_degree(m:Tsuperregister);
|
||||
|
||||
var adj : Psuperregisterworklist;
|
||||
d : byte;
|
||||
n : tsuperregister;
|
||||
d,n : tsuperregister;
|
||||
i : integer;
|
||||
begin
|
||||
d:=reginfo[m].degree;
|
||||
@ -986,13 +985,12 @@ implementation
|
||||
procedure trgobj.simplify;
|
||||
|
||||
var adj : Psuperregisterworklist;
|
||||
min : byte;
|
||||
p,n : Tsuperregister;
|
||||
i : integer;
|
||||
min,i : integer;
|
||||
begin
|
||||
{We the element with the least interferences out of the
|
||||
simplifyworklist.}
|
||||
min:=$ff;
|
||||
min:=high(integer);
|
||||
p:=0;
|
||||
n:=0;
|
||||
i:=simplifyworklist.head;
|
||||
@ -1403,7 +1401,8 @@ implementation
|
||||
n:=coalescednodes.buf[i];
|
||||
k:=get_alias(n);
|
||||
reginfo[n].colour:=reginfo[k].colour;
|
||||
include(used_in_proc,reginfo[k].colour);
|
||||
if reginfo[k].colour<maxcpuregister then
|
||||
include(used_in_proc,reginfo[k].colour);
|
||||
coalescednodes.next(i);
|
||||
end;
|
||||
{$ifdef ra_debug}
|
||||
@ -1633,7 +1632,7 @@ implementation
|
||||
{Precoloured nodes should have an infinite degree, which we can approach
|
||||
by 255.}
|
||||
for i:=0 to first_imaginary-1 do
|
||||
reginfo[i].degree:=255;
|
||||
reginfo[i].degree:=high(tsuperregister);
|
||||
for i:=first_imaginary to maxreg-1 do
|
||||
reginfo[i].degree:=0;
|
||||
{ exclude(unusedregs,RS_STACK_POINTER_REG);}
|
||||
@ -1820,7 +1819,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.94 2003-11-07 15:58:32 florian
|
||||
Revision 1.95 2003-11-10 19:05:50 peter
|
||||
* fixed alias/colouring > 255
|
||||
|
||||
Revision 1.94 2003/11/07 15:58:32 florian
|
||||
* Florian's culmutative nr. 1; contains:
|
||||
- invalid calling conventions for a certain cpu are rejected
|
||||
- arm softfloat calling conventions
|
||||
|
@ -71,26 +71,8 @@ uses
|
||||
{ Available Registers }
|
||||
{$i rspcon.inc}
|
||||
|
||||
{ Integer Super registers first and last }
|
||||
{$warning Supreg shall be $00-$1f}
|
||||
first_int_supreg = $00;
|
||||
last_int_supreg = $1f;
|
||||
|
||||
first_int_imreg = $20;
|
||||
last_int_imreg = $fe;
|
||||
|
||||
{ Float Super register first and last }
|
||||
first_fpu_supreg = $00;
|
||||
last_fpu_supreg = $1f;
|
||||
|
||||
first_fpu_imreg = $20;
|
||||
last_fpu_imreg = $fe;
|
||||
|
||||
{ MM Super register first and last }
|
||||
first_mmx_supreg = RS_INVALID;
|
||||
last_mmx_supreg = RS_INVALID;
|
||||
first_mmx_imreg = RS_INVALID;
|
||||
last_mmx_imreg = RS_INVALID;
|
||||
first_fpu_imreg = $20;
|
||||
|
||||
{$warning TODO Calculate bsstart}
|
||||
regnumber_count_bsstart = 128;
|
||||
@ -196,7 +178,7 @@ uses
|
||||
pparareference = ^tparareference;
|
||||
tparareference = packed record
|
||||
index : tregister;
|
||||
offset : aword;
|
||||
offset : longint;
|
||||
end;
|
||||
|
||||
const
|
||||
@ -479,7 +461,7 @@ implementation
|
||||
|
||||
uses
|
||||
rgBase,verbose;
|
||||
|
||||
|
||||
const
|
||||
std_regname_table : TRegNameTAble = (
|
||||
{$i rspstd.inc}
|
||||
@ -568,7 +550,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.56 2003-11-01 19:27:54 peter
|
||||
Revision 1.57 2003-11-10 19:05:50 peter
|
||||
* fixed alias/colouring > 255
|
||||
|
||||
Revision 1.56 2003/11/01 19:27:54 peter
|
||||
* 1.9.0
|
||||
|
||||
Revision 1.55 2003/10/31 08:47:13 mazen
|
||||
|
@ -94,7 +94,7 @@ implementation
|
||||
|
||||
function tsparcparamanager.get_volatile_registers_fpu(calloption : tproccalloption):TCpuRegisterSet;
|
||||
begin
|
||||
result:=[first_fpu_supreg..last_fpu_supreg];;
|
||||
result:=[RS_F0..RS_F31];
|
||||
end;
|
||||
|
||||
|
||||
@ -294,7 +294,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.34 2003-10-24 11:25:32 mazen
|
||||
Revision 1.35 2003-11-10 19:05:50 peter
|
||||
* fixed alias/colouring > 255
|
||||
|
||||
Revision 1.34 2003/10/24 11:25:32 mazen
|
||||
-unused units removed from uses clause
|
||||
*fix related to rg which was removed
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user