* a_call_ref removed

This commit is contained in:
peter 2003-09-28 13:37:19 +00:00
parent 36c2bb1e1a
commit e248f1b570
2 changed files with 12 additions and 38 deletions

View File

@ -160,12 +160,13 @@ unit cgobj;
{# Emits instruction to call the method specified by symbol name.
This routine must be overriden for each new target cpu.
There is no a_call_ref because loading the reference will use
a temp register on most cpu's resulting in conflicts with the
registers used for the parameters (PFV)
}
procedure a_call_name(list : taasmoutput;const s : string);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_loc(list : taasmoutput;const loc:tlocation);
{ move instructions }
procedure a_load_const_reg(list : taasmoutput;size : tcgsize;a : aword;register : tregister);virtual; abstract;
@ -752,30 +753,6 @@ unit cgobj;
end;
procedure tcg.a_call_ref(list : taasmoutput;const ref:treference);
var
tmpreg: tregister;
begin
tmpreg:=rg.getaddressregister(list);
a_load_ref_reg(list,OS_ADDR,OS_ADDR,ref,tmpreg);
a_call_reg(list,tmpreg);
rg.ungetaddressregister(list,tmpreg);
end;
procedure tcg.a_call_loc(list : taasmoutput;const loc:tlocation);
begin
case loc.loc of
LOC_REGISTER,LOC_CREGISTER:
cg.a_call_reg(list,loc.register);
LOC_REFERENCE,LOC_CREFERENCE :
cg.a_call_ref(list,loc.reference);
else
internalerror(200203311);
end;
end;
function tcg.optimize_op_const_reg(list: taasmoutput; var op: topcg; var a : aword; var reg:tregister): boolean;
var
powerval : longint;
@ -1575,7 +1552,10 @@ finalization
end.
{
$Log$
Revision 1.123 2003-09-25 21:26:24 peter
Revision 1.124 2003-09-28 13:40:13 peter
* a_call_ref removed
Revision 1.123 2003/09/25 21:26:24 peter
* remove obsolete tparalocation.sp_fixup
Revision 1.122 2003/09/23 20:37:16 peter

View File

@ -50,10 +50,8 @@ unit cgx86;
procedure a_paramaddr_ref(list : taasmoutput;const r : treference;const locpara : tparalocation);override;
procedure a_call_name(list : taasmoutput;const s : string);override;
procedure a_call_ref(list : taasmoutput;const ref : treference);override;
procedure a_call_reg(list : taasmoutput;reg : tregister);override;
procedure a_op_const_reg(list : taasmoutput; Op: TOpCG; size: TCGSize; a: AWord; reg: TRegister); override;
procedure a_op_const_ref(list : taasmoutput; Op: TOpCG; size: TCGSize; a: AWord; const ref: TReference); override;
procedure a_op_reg_reg(list : taasmoutput; Op: TOpCG; size: TCGSize; src, dst: TRegister); override;
@ -500,14 +498,7 @@ unit cgx86;
end;
procedure tcgx86.a_call_ref(list : taasmoutput;const ref : treference);
begin
list.concat(taicpu.op_ref(A_CALL,S_NO,ref));
end;
procedure tcgx86.a_call_reg(list : taasmoutput;reg : tregister);
begin
list.concat(taicpu.op_reg(A_CALL,S_NO,reg));
end;
@ -1607,7 +1598,10 @@ unit cgx86;
end.
{
$Log$
Revision 1.66 2003-09-25 21:29:16 peter
Revision 1.67 2003-09-28 13:37:19 peter
* a_call_ref removed
Revision 1.66 2003/09/25 21:29:16 peter
* change push/pop in getreg/ungetreg
Revision 1.65 2003/09/25 13:13:32 florian