mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 11:29:27 +02:00
* RiscV: push_addr_param unified
This commit is contained in:
parent
9de0025394
commit
b7608b045b
@ -50,6 +50,7 @@ unit pararv;
|
||||
|
||||
function push_addr_param(varspez: tvarspez; def: tdef; calloption: tproccalloption): boolean;override;
|
||||
|
||||
function create_paraloc_info(p: tabstractprocdef; side: tcallercallee): longint;override;
|
||||
protected
|
||||
procedure init_values(var curintreg, curfloatreg, curmmreg: tsuperregister; var cur_stack_offset: aword);
|
||||
end;
|
||||
@ -309,6 +310,19 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
function trvparamanager.create_paraloc_info(p: tabstractprocdef; side: tcallercallee): longint;
|
||||
var
|
||||
cur_stack_offset: aword;
|
||||
curintreg, curfloatreg, curmmreg : tsuperregister;
|
||||
begin
|
||||
init_values(curintreg, curfloatreg, curmmreg, cur_stack_offset);
|
||||
|
||||
result := create_paraloc_info_intern(p, side, p.paras, curintreg, curfloatreg, curmmreg, cur_stack_offset, false);
|
||||
|
||||
create_funcretloc_info(p, side);
|
||||
end;
|
||||
|
||||
|
||||
function trvparamanager.create_paraloc_info_intern(p: tabstractprocdef; side: tcallercallee; paras: tparalist; var curintreg, curfloatreg, curmmreg: tsuperregister; var cur_stack_offset: aword; isVararg : boolean): longint;
|
||||
var
|
||||
nextintreg, nextfloatreg, nextmmreg : tsuperregister;
|
||||
|
@ -25,38 +25,15 @@ unit cpupara;
|
||||
interface
|
||||
|
||||
uses
|
||||
globtype,
|
||||
aasmtai,aasmdata,
|
||||
cpubase,
|
||||
symconst,symtype,symdef,symsym,
|
||||
paramgr,parabase,cgbase,cgutils,
|
||||
pararv;
|
||||
paramgr,
|
||||
pararv;
|
||||
|
||||
type
|
||||
tcpuparamanager = class(trvparamanager)
|
||||
function create_paraloc_info(p : tabstractprocdef; side: tcallercallee):longint;override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
cpuinfo,globals,
|
||||
verbose,systems,
|
||||
defutil,symtable,
|
||||
procinfo,cpupi;
|
||||
|
||||
function tcpuparamanager.create_paraloc_info(p : tabstractprocdef; side: tcallercallee):longint;
|
||||
var
|
||||
cur_stack_offset: aword;
|
||||
curintreg, curfloatreg, curmmreg: tsuperregister;
|
||||
begin
|
||||
init_values(curintreg,curfloatreg,curmmreg,cur_stack_offset);
|
||||
|
||||
result := create_paraloc_info_intern(p,side,p.paras,curintreg,curfloatreg,curmmreg,cur_stack_offset,false);
|
||||
|
||||
create_funcretloc_info(p,side);
|
||||
end;
|
||||
|
||||
begin
|
||||
paramanager:=tcpuparamanager.create;
|
||||
paramanager:=tcpuparamanager.create;
|
||||
end.
|
||||
|
@ -35,8 +35,6 @@ unit cpupara;
|
||||
type
|
||||
tcpuparamanager = class(trvparamanager)
|
||||
function ret_in_param(def: tdef; pd: tabstractprocdef): boolean; override;
|
||||
|
||||
function create_paraloc_info(p: tabstractprocdef; side: tcallercallee): longint; override;
|
||||
private
|
||||
function parseparaloc(p: tparavarsym; const s: string): boolean; override;
|
||||
end;
|
||||
@ -59,19 +57,6 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
function tcpuparamanager.create_paraloc_info(p: tabstractprocdef; side: tcallercallee): longint;
|
||||
var
|
||||
cur_stack_offset: aword;
|
||||
curintreg, curfloatreg, curmmreg : tsuperregister;
|
||||
begin
|
||||
init_values(curintreg, curfloatreg, curmmreg, cur_stack_offset);
|
||||
|
||||
result := create_paraloc_info_intern(p, side, p.paras, curintreg, curfloatreg, curmmreg, cur_stack_offset, false);
|
||||
|
||||
create_funcretloc_info(p, side);
|
||||
end;
|
||||
|
||||
|
||||
function tcpuparamanager.parseparaloc(p: tparavarsym; const s: string): boolean;
|
||||
begin
|
||||
internalerror(200404182);
|
||||
|
Loading…
Reference in New Issue
Block a user