mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-03 10:09:52 +01:00
* fixed some ppc problems
This commit is contained in:
parent
2d7a914392
commit
c8863b920b
@ -34,6 +34,10 @@ unit cgcpu;
|
||||
|
||||
type
|
||||
tcgppc = class(tcg)
|
||||
procedure init_register_allocators;override;
|
||||
procedure done_register_allocators;override;
|
||||
|
||||
|
||||
{ passing parameters, per default the parameter is pushed }
|
||||
{ nr gives the number of the parameter (enumerated from }
|
||||
{ left to right), this allows to move the parameter to }
|
||||
@ -151,10 +155,20 @@ const
|
||||
implementation
|
||||
|
||||
uses
|
||||
globtype,globals,verbose,systems,cutils,symconst,symdef,symsym,rgobj,tgobj,cpupi;
|
||||
globtype,globals,verbose,systems,cutils,symconst,symdef,symsym,rgobj,tgobj,cpupi, rgcpu;
|
||||
|
||||
|
||||
procedure tcgppc.init_register_allocators;
|
||||
begin
|
||||
rg := trgcpu.create(29,chr(ord(RS_R3))+chr(ord(RS_R4))+chr(ord(RS_R5))+chr(ord(RS_R6))+chr(ord(RS_R7))+chr(ord(RS_R8))+chr(ord(RS_R9))+chr(ord(RS_R10))+chr(ord(RS_R11))+chr(ord(RS_R12))+chr(ord(RS_R31))+chr(ord(RS_R30))+chr(ord(RS_R29))+chr(ord(RS_R28))+chr(ord(RS_R27))+chr(ord(RS_R26))+chr(ord(RS_R25))+chr(ord(RS_R24))+chr(ord(RS_R23))+chr(ord(RS_R22))+chr(ord(RS_R21))+chr(ord(RS_R20))+chr(ord(RS_R19))+chr(ord(RS_R18))+chr(ord(RS_R17))+chr(ord(RS_R16))+chr(ord(RS_R15))+chr(ord(RS_R14))+chr(ord(RS_R13)));
|
||||
end;
|
||||
|
||||
|
||||
procedure tcgppc.done_register_allocators;
|
||||
begin
|
||||
rg.free;
|
||||
end;
|
||||
|
||||
{ parameter passing... Still needs extra support from the processor }
|
||||
{ independent code generator }
|
||||
|
||||
procedure tcgppc.a_param_const(list : taasmoutput;size : tcgsize;a : aword;const locpara : tparalocation);
|
||||
var
|
||||
@ -2382,7 +2396,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.125 2003-09-03 21:04:14 peter
|
||||
Revision 1.126 2003-09-14 16:37:20 jonas
|
||||
* fixed some ppc problems
|
||||
|
||||
Revision 1.125 2003/09/03 21:04:14 peter
|
||||
* some fixes for ppc
|
||||
|
||||
Revision 1.124 2003/09/03 19:35:24 peter
|
||||
|
||||
@ -116,8 +116,7 @@ uses
|
||||
{$i rppccon.inc}
|
||||
|
||||
{ Integer Super registers first and last }
|
||||
{$warning Supreg shall be $00-$1f}
|
||||
first_int_supreg = RS_R3;
|
||||
first_int_supreg = RS_R0;
|
||||
last_int_supreg = RS_R31;
|
||||
|
||||
first_int_imreg = $20;
|
||||
@ -748,7 +747,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.67 2003-09-03 21:04:14 peter
|
||||
Revision 1.68 2003-09-14 16:37:20 jonas
|
||||
* fixed some ppc problems
|
||||
|
||||
Revision 1.67 2003/09/03 21:04:14 peter
|
||||
* some fixes for ppc
|
||||
|
||||
Revision 1.66 2003/09/03 19:35:24 peter
|
||||
|
||||
@ -36,8 +36,7 @@ unit cpupara;
|
||||
type
|
||||
tppcparamanager = class(tparamanager)
|
||||
function push_addr_param(def : tdef;calloption : tproccalloption) : boolean;override;
|
||||
function getintparaloc(list: taasmoutput; nr : longint) : tparalocation;override;
|
||||
procedure freeintparaloc(list: taasmoutput; nr : longint); override;
|
||||
function getintparaloc(calloption : tproccalloption; nr : longint) : tparalocation;override;
|
||||
procedure create_paraloc_info(p : tabstractprocdef; side: tcallercallee);override;
|
||||
end;
|
||||
|
||||
@ -49,7 +48,7 @@ unit cpupara;
|
||||
rgobj,
|
||||
defutil,symsym;
|
||||
|
||||
function tppcparamanager.getintparaloc(list: taasmoutput; nr : longint) : tparalocation;
|
||||
function tppcparamanager.getintparaloc(calloption : tproccalloption; nr : longint) : tparalocation;
|
||||
|
||||
begin
|
||||
fillchar(result,sizeof(tparalocation),0);
|
||||
@ -59,7 +58,6 @@ unit cpupara;
|
||||
begin
|
||||
result.loc:=LOC_REGISTER;
|
||||
result.register:=newreg(R_INTREGISTER,RS_R2+nr,R_SUBWHOLE);
|
||||
rg.getexplicitregisterint(list,result.register);
|
||||
end
|
||||
else
|
||||
begin
|
||||
@ -71,22 +69,6 @@ unit cpupara;
|
||||
end;
|
||||
|
||||
|
||||
procedure tppcparamanager.freeintparaloc(list: taasmoutput; nr : longint);
|
||||
|
||||
var
|
||||
r: tregister;
|
||||
|
||||
begin
|
||||
if nr<1 then
|
||||
internalerror(2003060401)
|
||||
else if nr<=8 then
|
||||
begin
|
||||
r:=newreg(R_INTREGISTER,RS_R2+nr,R_SUBWHOLE);
|
||||
rg.ungetregisterint(list,r);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
function getparaloc(p : tdef) : tcgloc;
|
||||
|
||||
begin
|
||||
@ -345,7 +327,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.44 2003-09-03 21:04:14 peter
|
||||
Revision 1.45 2003-09-14 16:37:20 jonas
|
||||
* fixed some ppc problems
|
||||
|
||||
Revision 1.44 2003/09/03 21:04:14 peter
|
||||
* some fixes for ppc
|
||||
|
||||
Revision 1.43 2003/09/03 19:35:24 peter
|
||||
|
||||
Loading…
Reference in New Issue
Block a user