mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 12:49:33 +02:00
* made a_call_ref of PowerPC generic, we need to allocate a register after all on risc platforms
git-svn-id: trunk@18962 -
This commit is contained in:
parent
b17a9385e5
commit
6d996bf832
@ -223,14 +223,10 @@ unit cgobj;
|
||||
|
||||
{# Emits instruction to call the method specified by symbol name.
|
||||
This routine must be overridden 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 : TAsmList;const s : string; weak: boolean);virtual; abstract;
|
||||
procedure a_call_reg(list : TAsmList;reg : tregister);virtual; abstract;
|
||||
procedure a_call_ref(list : TAsmList;ref : treference);virtual; abstract;
|
||||
procedure a_call_ref(list : TAsmList;ref : treference);virtual;
|
||||
{ same as a_call_name, might be overridden on certain architectures to emit
|
||||
static calls without usage of a got trampoline }
|
||||
procedure a_call_name_static(list : TAsmList;const s : string);virtual;
|
||||
@ -4220,12 +4216,23 @@ implementation
|
||||
a_jmp_name(list,externalname);
|
||||
end;
|
||||
|
||||
|
||||
procedure tcg.a_call_name_static(list : TAsmList;const s : string);
|
||||
begin
|
||||
a_call_name(list,s,false);
|
||||
end;
|
||||
|
||||
|
||||
procedure tcg.a_call_ref(list : TAsmList;ref: treference);
|
||||
var
|
||||
tempreg : TRegister;
|
||||
begin
|
||||
tempreg := getintregister(list, OS_ADDR);
|
||||
a_load_ref_reg(list,OS_ADDR,OS_ADDR,ref,tempreg);
|
||||
a_call_reg(list,tempreg);
|
||||
end;
|
||||
|
||||
|
||||
function tcg.g_indirect_sym_load(list:TAsmList;const symname: string; weak: boolean): tregister;
|
||||
var
|
||||
l: tasmsymbol;
|
||||
|
@ -410,16 +410,6 @@ unit cgppc;
|
||||
end;
|
||||
|
||||
|
||||
procedure tcgppcgen.a_call_ref(list : TAsmList;ref: treference);
|
||||
var
|
||||
tempreg : TRegister;
|
||||
begin
|
||||
tempreg := getintregister(list, OS_ADDR);
|
||||
a_load_ref_reg(list,OS_ADDR,OS_ADDR,ref,tempreg);
|
||||
a_call_reg(list,tempreg);
|
||||
end;
|
||||
|
||||
|
||||
procedure tcgppcgen.a_load_reg_ref(list: TAsmList; fromsize, tosize: TCGSize;
|
||||
reg: tregister; const ref: treference);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user