mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 10:39:18 +02:00
* fixed alias/colouring > 255
This commit is contained in:
parent
f2ad2b9d19
commit
f44380e4a9
@ -172,7 +172,7 @@ unit rgobj;
|
|||||||
colour : Tsuperregister;
|
colour : Tsuperregister;
|
||||||
movelist : Pmovelist;
|
movelist : Pmovelist;
|
||||||
adjlist : Psuperregisterworklist;
|
adjlist : Psuperregisterworklist;
|
||||||
degree : byte;
|
degree : TSuperregister;
|
||||||
end;
|
end;
|
||||||
Preginfo=^TReginfo;
|
Preginfo=^TReginfo;
|
||||||
|
|
||||||
@ -553,7 +553,7 @@ implementation
|
|||||||
maxreginfo:=first_imaginary;
|
maxreginfo:=first_imaginary;
|
||||||
maxreginfoinc:=16;
|
maxreginfoinc:=16;
|
||||||
for i:=0 to first_imaginary-1 do
|
for i:=0 to first_imaginary-1 do
|
||||||
reginfo[i].degree:=255;
|
reginfo[i].degree:=high(tsuperregister);
|
||||||
worklist_moves:=Tlinkedlist.create;
|
worklist_moves:=Tlinkedlist.create;
|
||||||
{ Usable registers }
|
{ Usable registers }
|
||||||
fillchar(usable_registers,sizeof(usable_registers),0);
|
fillchar(usable_registers,sizeof(usable_registers),0);
|
||||||
@ -947,8 +947,7 @@ implementation
|
|||||||
procedure trgobj.decrement_degree(m:Tsuperregister);
|
procedure trgobj.decrement_degree(m:Tsuperregister);
|
||||||
|
|
||||||
var adj : Psuperregisterworklist;
|
var adj : Psuperregisterworklist;
|
||||||
d : byte;
|
d,n : tsuperregister;
|
||||||
n : tsuperregister;
|
|
||||||
i : integer;
|
i : integer;
|
||||||
begin
|
begin
|
||||||
d:=reginfo[m].degree;
|
d:=reginfo[m].degree;
|
||||||
@ -986,13 +985,12 @@ implementation
|
|||||||
procedure trgobj.simplify;
|
procedure trgobj.simplify;
|
||||||
|
|
||||||
var adj : Psuperregisterworklist;
|
var adj : Psuperregisterworklist;
|
||||||
min : byte;
|
|
||||||
p,n : Tsuperregister;
|
p,n : Tsuperregister;
|
||||||
i : integer;
|
min,i : integer;
|
||||||
begin
|
begin
|
||||||
{We the element with the least interferences out of the
|
{We the element with the least interferences out of the
|
||||||
simplifyworklist.}
|
simplifyworklist.}
|
||||||
min:=$ff;
|
min:=high(integer);
|
||||||
p:=0;
|
p:=0;
|
||||||
n:=0;
|
n:=0;
|
||||||
i:=simplifyworklist.head;
|
i:=simplifyworklist.head;
|
||||||
@ -1403,6 +1401,7 @@ implementation
|
|||||||
n:=coalescednodes.buf[i];
|
n:=coalescednodes.buf[i];
|
||||||
k:=get_alias(n);
|
k:=get_alias(n);
|
||||||
reginfo[n].colour:=reginfo[k].colour;
|
reginfo[n].colour:=reginfo[k].colour;
|
||||||
|
if reginfo[k].colour<maxcpuregister then
|
||||||
include(used_in_proc,reginfo[k].colour);
|
include(used_in_proc,reginfo[k].colour);
|
||||||
coalescednodes.next(i);
|
coalescednodes.next(i);
|
||||||
end;
|
end;
|
||||||
@ -1633,7 +1632,7 @@ implementation
|
|||||||
{Precoloured nodes should have an infinite degree, which we can approach
|
{Precoloured nodes should have an infinite degree, which we can approach
|
||||||
by 255.}
|
by 255.}
|
||||||
for i:=0 to first_imaginary-1 do
|
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
|
for i:=first_imaginary to maxreg-1 do
|
||||||
reginfo[i].degree:=0;
|
reginfo[i].degree:=0;
|
||||||
{ exclude(unusedregs,RS_STACK_POINTER_REG);}
|
{ exclude(unusedregs,RS_STACK_POINTER_REG);}
|
||||||
@ -1820,7 +1819,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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:
|
* Florian's culmutative nr. 1; contains:
|
||||||
- invalid calling conventions for a certain cpu are rejected
|
- invalid calling conventions for a certain cpu are rejected
|
||||||
- arm softfloat calling conventions
|
- arm softfloat calling conventions
|
||||||
|
@ -71,26 +71,8 @@ uses
|
|||||||
{ Available Registers }
|
{ Available Registers }
|
||||||
{$i rspcon.inc}
|
{$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;
|
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;
|
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;
|
|
||||||
|
|
||||||
{$warning TODO Calculate bsstart}
|
{$warning TODO Calculate bsstart}
|
||||||
regnumber_count_bsstart = 128;
|
regnumber_count_bsstart = 128;
|
||||||
@ -196,7 +178,7 @@ uses
|
|||||||
pparareference = ^tparareference;
|
pparareference = ^tparareference;
|
||||||
tparareference = packed record
|
tparareference = packed record
|
||||||
index : tregister;
|
index : tregister;
|
||||||
offset : aword;
|
offset : longint;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
const
|
const
|
||||||
@ -568,7 +550,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* 1.9.0
|
||||||
|
|
||||||
Revision 1.55 2003/10/31 08:47:13 mazen
|
Revision 1.55 2003/10/31 08:47:13 mazen
|
||||||
|
@ -94,7 +94,7 @@ implementation
|
|||||||
|
|
||||||
function tsparcparamanager.get_volatile_registers_fpu(calloption : tproccalloption):TCpuRegisterSet;
|
function tsparcparamanager.get_volatile_registers_fpu(calloption : tproccalloption):TCpuRegisterSet;
|
||||||
begin
|
begin
|
||||||
result:=[first_fpu_supreg..last_fpu_supreg];;
|
result:=[RS_F0..RS_F31];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -294,7 +294,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
-unused units removed from uses clause
|
||||||
*fix related to rg which was removed
|
*fix related to rg which was removed
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user