mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 22:06:40 +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 push_addr_param(varspez: tvarspez; def: tdef; calloption: tproccalloption): boolean;override;
|
||||||
|
|
||||||
|
function create_paraloc_info(p: tabstractprocdef; side: tcallercallee): longint;override;
|
||||||
protected
|
protected
|
||||||
procedure init_values(var curintreg, curfloatreg, curmmreg: tsuperregister; var cur_stack_offset: aword);
|
procedure init_values(var curintreg, curfloatreg, curmmreg: tsuperregister; var cur_stack_offset: aword);
|
||||||
end;
|
end;
|
||||||
@ -309,6 +310,19 @@ implementation
|
|||||||
end;
|
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;
|
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
|
var
|
||||||
nextintreg, nextfloatreg, nextmmreg : tsuperregister;
|
nextintreg, nextfloatreg, nextmmreg : tsuperregister;
|
||||||
|
@ -25,38 +25,15 @@ unit cpupara;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
globtype,
|
paramgr,
|
||||||
aasmtai,aasmdata,
|
pararv;
|
||||||
cpubase,
|
|
||||||
symconst,symtype,symdef,symsym,
|
|
||||||
paramgr,parabase,cgbase,cgutils,
|
|
||||||
pararv;
|
|
||||||
|
|
||||||
type
|
type
|
||||||
tcpuparamanager = class(trvparamanager)
|
tcpuparamanager = class(trvparamanager)
|
||||||
function create_paraloc_info(p : tabstractprocdef; side: tcallercallee):longint;override;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
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
|
begin
|
||||||
paramanager:=tcpuparamanager.create;
|
paramanager:=tcpuparamanager.create;
|
||||||
end.
|
end.
|
||||||
|
@ -35,8 +35,6 @@ unit cpupara;
|
|||||||
type
|
type
|
||||||
tcpuparamanager = class(trvparamanager)
|
tcpuparamanager = class(trvparamanager)
|
||||||
function ret_in_param(def: tdef; pd: tabstractprocdef): boolean; override;
|
function ret_in_param(def: tdef; pd: tabstractprocdef): boolean; override;
|
||||||
|
|
||||||
function create_paraloc_info(p: tabstractprocdef; side: tcallercallee): longint; override;
|
|
||||||
private
|
private
|
||||||
function parseparaloc(p: tparavarsym; const s: string): boolean; override;
|
function parseparaloc(p: tparavarsym; const s: string): boolean; override;
|
||||||
end;
|
end;
|
||||||
@ -59,19 +57,6 @@ implementation
|
|||||||
end;
|
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;
|
function tcpuparamanager.parseparaloc(p: tparavarsym; const s: string): boolean;
|
||||||
begin
|
begin
|
||||||
internalerror(200404182);
|
internalerror(200404182);
|
||||||
|
Loading…
Reference in New Issue
Block a user