mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-08 11:19:36 +02:00
* moved definition of maxcpuregister and tcpuregisterset from cgbase to
cgutils, and define them so they are no larger than what is required by the current target platform * added cgutils to the uses clause of several units that use the tcpuregisterset type git-svn-id: trunk@21624 -
This commit is contained in:
parent
6f336a5d13
commit
0fc422f244
@ -50,7 +50,7 @@ unit cpupi;
|
||||
aasmtai,aasmdata,
|
||||
tgobj,
|
||||
symconst,symsym,paramgr,
|
||||
cgbase,
|
||||
cgbase,cgutils,
|
||||
cgobj;
|
||||
|
||||
procedure tarmprocinfo.set_first_temp_offset;
|
||||
|
@ -62,7 +62,7 @@ Unit raarmgas;
|
||||
procinfo,
|
||||
itcpugas,
|
||||
rabase,rautils,
|
||||
cgbase,cgobj
|
||||
cgbase,cgutils,cgobj
|
||||
;
|
||||
|
||||
|
||||
|
@ -59,7 +59,7 @@ Unit raavrgas;
|
||||
procinfo,
|
||||
itcpugas,
|
||||
rabase,rautils,
|
||||
cgbase,cgobj
|
||||
cgbase,cgutils,cgobj
|
||||
;
|
||||
|
||||
|
||||
|
@ -220,7 +220,6 @@ interface
|
||||
end;
|
||||
|
||||
{ Set type definition for registers }
|
||||
tcpuregisterset = set of byte;
|
||||
tsuperregisterset = array[byte] of set of byte;
|
||||
|
||||
pmmshuffle = ^tmmshuffle;
|
||||
@ -264,10 +263,6 @@ interface
|
||||
{ Invalid register number }
|
||||
RS_INVALID = high(tsuperregister);
|
||||
|
||||
{ Maximum number of cpu registers per register type,
|
||||
this must fit in tcpuregisterset }
|
||||
maxcpuregister = 32;
|
||||
|
||||
tcgsize2size : Array[tcgsize] of integer =
|
||||
{ integer values }
|
||||
(0,1,2,4,8,16,1,2,4,8,16,
|
||||
|
@ -32,7 +32,17 @@ unit cgutils;
|
||||
aasmbase,
|
||||
cpubase,cgbase;
|
||||
|
||||
const
|
||||
{ implementation of max function using only functionality that can be
|
||||
evaluated as a constant expression by the compiler -- this is
|
||||
basically maxcpureg = max(max(first_int_imreg,first_fpu_imreg),first_mm_imreg)-1 }
|
||||
tmpmaxcpufpuintreg = first_int_imreg + ((first_fpu_imreg - first_int_imreg) * ord(first_int_imreg < first_fpu_imreg));
|
||||
maxcpuregister = (tmpmaxcpufpuintreg + ((first_mm_imreg - tmpmaxcpufpuintreg) * ord(tmpmaxcpufpuintreg < first_mm_imreg)))-1;
|
||||
|
||||
type
|
||||
{ Set type definition for cpuregisters }
|
||||
tcpuregisterset = set of 0..maxcpuregister;
|
||||
|
||||
{$ifdef jvm}
|
||||
tarrayreftype = (art_none,art_indexreg,art_indexref,art_indexconst);
|
||||
{$endif jvm}
|
||||
|
@ -99,7 +99,7 @@ Implementation
|
||||
systems,
|
||||
{ aasm }
|
||||
cpuinfo,aasmtai,aasmdata,aasmcpu,
|
||||
cgbase,
|
||||
cgbase,cgutils,
|
||||
{ symtable }
|
||||
symbase,symtype,symsym,symdef,symtable,
|
||||
{ pass 1 }
|
||||
|
@ -28,7 +28,7 @@ interface
|
||||
cclasses,
|
||||
aasmtai,
|
||||
cpubase,cpuinfo,
|
||||
symconst,symbase,symsym,symtype,symdef,paramgr,parabase,cgbase;
|
||||
symconst,symbase,symsym,symtype,symdef,paramgr,parabase,cgbase,cgutils;
|
||||
|
||||
const
|
||||
MIPS_MAX_OFFSET = 20;
|
||||
@ -92,7 +92,7 @@ implementation
|
||||
uses
|
||||
cutils,verbose,systems,
|
||||
defutil, cpupi, procinfo,
|
||||
cgutils,cgobj;
|
||||
cgobj;
|
||||
|
||||
|
||||
|
||||
|
@ -57,7 +57,7 @@ implementation
|
||||
|
||||
uses
|
||||
systems,globals,verbose,
|
||||
cpubase,cgbase,cgobj,
|
||||
cpubase,cgbase,cgutils,cgobj,
|
||||
tgobj,paramgr,symconst;
|
||||
|
||||
constructor TMIPSProcInfo.create(aparent: tprocinfo);
|
||||
|
@ -191,7 +191,7 @@ unit rgobj;
|
||||
{# Highest register allocated until now.}
|
||||
reginfo : PReginfo;
|
||||
usable_registers_cnt : word;
|
||||
usable_registers : array[0..maxcpuregister-1] of tsuperregister;
|
||||
usable_registers : array[0..maxcpuregister] of tsuperregister;
|
||||
ibitmap : Tinterferencebitmap;
|
||||
spillednodes,
|
||||
simplifyworklist,
|
||||
|
Loading…
Reference in New Issue
Block a user