mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 22:06:40 +02:00
* generic a_call_ref
This commit is contained in:
parent
4d70aebb1b
commit
948ef20ecc
@ -184,7 +184,7 @@ unit cgobj;
|
|||||||
This routine must be overriden for each new target cpu.
|
This routine must be overriden for each new target cpu.
|
||||||
}
|
}
|
||||||
procedure a_call_name(list : taasmoutput;const s : string);virtual; abstract;
|
procedure a_call_name(list : taasmoutput;const s : string);virtual; abstract;
|
||||||
procedure a_call_ref(list : taasmoutput;const ref : treference);virtual;abstract;
|
procedure a_call_ref(list : taasmoutput;const ref : treference);virtual;
|
||||||
procedure a_call_reg(list : taasmoutput;reg : tregister);virtual;abstract;
|
procedure a_call_reg(list : taasmoutput;reg : tregister);virtual;abstract;
|
||||||
procedure a_call_loc(list : taasmoutput;const loc:tlocation);
|
procedure a_call_loc(list : taasmoutput;const loc:tlocation);
|
||||||
|
|
||||||
@ -864,6 +864,25 @@ unit cgobj;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure tcg.a_call_ref(list : taasmoutput;const ref:treference);
|
||||||
|
var
|
||||||
|
tmpreg: tregister;
|
||||||
|
begin
|
||||||
|
{$ifdef newra}
|
||||||
|
tmpreg:=rg.getaddressregister(list);
|
||||||
|
{$else}
|
||||||
|
tmpreg := get_scratch_reg_address(list);
|
||||||
|
{$endif}
|
||||||
|
a_load_ref_reg(list,OS_ADDR,ref,tmpreg);
|
||||||
|
a_call_reg(list,tmpreg);
|
||||||
|
{$ifdef newra}
|
||||||
|
rg.ungetaddressregister(list,tmpreg);
|
||||||
|
{$else}
|
||||||
|
free_scratch_reg(list,tmpreg);
|
||||||
|
{$endif}
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tcg.a_call_loc(list : taasmoutput;const loc:tlocation);
|
procedure tcg.a_call_loc(list : taasmoutput;const loc:tlocation);
|
||||||
begin
|
begin
|
||||||
case loc.loc of
|
case loc.loc of
|
||||||
@ -1140,8 +1159,10 @@ unit cgobj;
|
|||||||
|
|
||||||
procedure tcg.a_op_reg_reg_reg(list: taasmoutput; op: TOpCg;
|
procedure tcg.a_op_reg_reg_reg(list: taasmoutput; op: TOpCg;
|
||||||
size: tcgsize; src1, src2, dst: tregister);
|
size: tcgsize; src1, src2, dst: tregister);
|
||||||
|
{$ifdef newra}
|
||||||
var
|
var
|
||||||
tmpreg: tregister;
|
tmpreg: tregister;
|
||||||
|
{$endif newra}
|
||||||
begin
|
begin
|
||||||
if (dst.number <> src1.number) then
|
if (dst.number <> src1.number) then
|
||||||
begin
|
begin
|
||||||
@ -1691,7 +1712,10 @@ finalization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.103 2003-05-30 23:57:08 peter
|
Revision 1.104 2003-06-01 01:02:39 peter
|
||||||
|
* generic a_call_ref
|
||||||
|
|
||||||
|
Revision 1.103 2003/05/30 23:57:08 peter
|
||||||
* more sparc cleanup
|
* more sparc cleanup
|
||||||
* accumulator removed, splitted in function_return_reg (called) and
|
* accumulator removed, splitted in function_return_reg (called) and
|
||||||
function_result_reg (caller)
|
function_result_reg (caller)
|
||||||
|
Loading…
Reference in New Issue
Block a user