From f44380e4a91750584119cb7ac21bab21ed2811c3 Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 10 Nov 2003 19:05:50 +0000 Subject: [PATCH] * fixed alias/colouring > 255 --- compiler/rgobj.pas | 22 ++++++++++++---------- compiler/sparc/cpubase.pas | 29 +++++++---------------------- compiler/sparc/cpupara.pas | 7 +++++-- 3 files changed, 24 insertions(+), 34 deletions(-) diff --git a/compiler/rgobj.pas b/compiler/rgobj.pas index a11c7ccf0d..3355875232 100644 --- a/compiler/rgobj.pas +++ b/compiler/rgobj.pas @@ -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 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 diff --git a/compiler/sparc/cpubase.pas b/compiler/sparc/cpubase.pas index 0155237c46..26bcccb036 100644 --- a/compiler/sparc/cpubase.pas +++ b/compiler/sparc/cpubase.pas @@ -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 diff --git a/compiler/sparc/cpupara.pas b/compiler/sparc/cpupara.pas index 9ed4d27175..b18c3bb1cb 100644 --- a/compiler/sparc/cpupara.pas +++ b/compiler/sparc/cpupara.pas @@ -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