mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 23:21:57 +02:00
+ first somewhat-valid AmigaOS/PowerPC support (no linking yet)
git-svn-id: trunk@4329 -
This commit is contained in:
parent
47e692b60b
commit
b77a51f67d
@ -1367,10 +1367,28 @@ begin
|
||||
{$ifdef powerpc}
|
||||
if target_info.system = system_powerpc_amiga then
|
||||
begin
|
||||
include(pd.procoptions,po_syscall_sysv);
|
||||
include(pd.procoptions,po_syscall_basesysv);
|
||||
|
||||
if consume_sym(sym,symtable) then
|
||||
begin
|
||||
if (sym.typ=globalvarsym) and
|
||||
(
|
||||
(tabstractvarsym(sym).vartype.def.deftype=pointerdef) or
|
||||
is_32bitint(tabstractvarsym(sym).vartype.def)
|
||||
) then
|
||||
begin
|
||||
tprocdef(pd).libsym:=sym;
|
||||
vs:=tparavarsym.create('$syscalllib',paranr_syscall_basesysv,vs_value,tabstractvarsym(sym).vartype,[vo_is_syscall_lib,vo_is_hidden_para]);
|
||||
pd.parast.insert(vs);
|
||||
end
|
||||
else
|
||||
Message(parser_e_32bitint_or_pointer_variable_expected);
|
||||
end;
|
||||
|
||||
(paramanager as tppcparamanager).create_funcretloc_info(pd,calleeside);
|
||||
(paramanager as tppcparamanager).create_funcretloc_info(pd,callerside);
|
||||
|
||||
tprocdef(pd).extnumber:=get_intconst;
|
||||
end else
|
||||
|
||||
if target_info.system = system_powerpc_morphos then
|
||||
|
@ -71,10 +71,13 @@ implementation
|
||||
system_powerpc_amiga:
|
||||
begin
|
||||
// one syscall convention for Amiga/PowerPC
|
||||
// which is quite standard
|
||||
extra_call_code;
|
||||
cg.a_call_name(current_asmdata.CurrAsmList,tprocdef(procdefinition).mangledname);
|
||||
extra_post_call_code;
|
||||
// which is very similar to basesysv on MorphOS
|
||||
cg.getcpuregister(current_asmdata.CurrAsmList,NR_R0);
|
||||
reference_reset_base(tmpref,NR_R3,tprocdef(procdefinition).extnumber);
|
||||
current_asmdata.CurrAsmList.concat(taicpu.op_reg_ref(A_LWZ,NR_R0,tmpref));
|
||||
current_asmdata.CurrAsmList.concat(taicpu.op_reg(A_MTCTR,NR_R0));
|
||||
current_asmdata.CurrAsmList.concat(taicpu.op_none(A_BCTRL));
|
||||
cg.ungetcpuregister(current_asmdata.CurrAsmList,NR_R0);
|
||||
end;
|
||||
system_powerpc_morphos:
|
||||
begin
|
||||
|
@ -39,10 +39,10 @@ implementation
|
||||
*****************************************************************************}
|
||||
|
||||
initialization
|
||||
{$ifdef m68k}
|
||||
{$ifdef cpu68}
|
||||
RegisterTarget(system_m68k_Amiga_info);
|
||||
{$endif m68k}
|
||||
{$ifdef powerpc}
|
||||
{$endif cpu68}
|
||||
{$ifdef cpupowerpc}
|
||||
RegisterTarget(system_powerpc_Amiga_info);
|
||||
{$endif powerpc}
|
||||
{$endif cpupowerpc}
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user