mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 09:06:02 +02:00
+ implemented volatile register queries
This commit is contained in:
parent
94b2de254f
commit
0bc32cbcd1
@ -31,10 +31,12 @@ unit cpupara;
|
|||||||
globtype,
|
globtype,
|
||||||
aasmtai,
|
aasmtai,
|
||||||
cpubase,
|
cpubase,
|
||||||
symconst,symbase,symtype,symdef,paramgr;
|
symconst,symbase,symtype,symdef,paramgr, cginfo;
|
||||||
|
|
||||||
type
|
type
|
||||||
tppcparamanager = class(tparamanager)
|
tppcparamanager = class(tparamanager)
|
||||||
|
function get_volatile_registers_int(calloption : tproccalloption):tsuperregisterset;override;
|
||||||
|
function get_volatile_registers_fpu(calloption : tproccalloption):tsuperregisterset;override;
|
||||||
function push_addr_param(def : tdef;calloption : tproccalloption) : boolean;override;
|
function push_addr_param(def : tdef;calloption : tproccalloption) : boolean;override;
|
||||||
function getintparaloc(calloption : tproccalloption; nr : longint) : tparalocation;override;
|
function getintparaloc(calloption : tproccalloption; nr : longint) : tparalocation;override;
|
||||||
procedure create_paraloc_info(p : tabstractprocdef; side: tcallercallee);override;
|
procedure create_paraloc_info(p : tabstractprocdef; side: tcallercallee);override;
|
||||||
@ -44,10 +46,30 @@ unit cpupara;
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
verbose,systems,
|
verbose,systems,
|
||||||
cpuinfo,cginfo,cgbase,
|
cpuinfo,cgbase,
|
||||||
rgobj,
|
rgobj,
|
||||||
defutil,symsym;
|
defutil,symsym;
|
||||||
|
|
||||||
|
|
||||||
|
function tppcparamanager.get_volatile_registers_int(calloption : tproccalloption):tsuperregisterset;
|
||||||
|
begin
|
||||||
|
result := [RS_R3..RS_R12];
|
||||||
|
end;
|
||||||
|
|
||||||
|
function tppcparamanager.get_volatile_registers_fpu(calloption : tproccalloption):tsuperregisterset;
|
||||||
|
begin
|
||||||
|
case target_info.abi of
|
||||||
|
abi_powerpc_aix:
|
||||||
|
result := [RS_F0..RS_F13];
|
||||||
|
abi_powerpc_sysv:
|
||||||
|
{ warning: the 64bit sysv abi also uses RS_F0..RS_F13 like the aix abi above }
|
||||||
|
result := [RS_F0..RS_F8];
|
||||||
|
else
|
||||||
|
internalerror(2003091401);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
function tppcparamanager.getintparaloc(calloption : tproccalloption; nr : longint) : tparalocation;
|
function tppcparamanager.getintparaloc(calloption : tproccalloption; nr : longint) : tparalocation;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -327,7 +349,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.45 2003-09-14 16:37:20 jonas
|
Revision 1.46 2003-09-14 21:56:41 jonas
|
||||||
|
+ implemented volatile register queries
|
||||||
|
|
||||||
|
Revision 1.45 2003/09/14 16:37:20 jonas
|
||||||
* fixed some ppc problems
|
* fixed some ppc problems
|
||||||
|
|
||||||
Revision 1.44 2003/09/03 21:04:14 peter
|
Revision 1.44 2003/09/03 21:04:14 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user