m68k-palmos: sketched up some entirely untested syscall support, but it's probably close to what we need

git-svn-id: trunk@36891 -
This commit is contained in:
Károly Balogh 2017-08-12 21:45:01 +00:00
parent fbe7798f6a
commit 8a71a70d3c
3 changed files with 22 additions and 2 deletions

View File

@ -98,6 +98,16 @@ implementation
else
internalerror(2005010403);
end;
system_m68k_palmos:
begin
if po_syscall in tprocdef(procdefinition).procoptions then
begin
current_asmdata.CurrAsmList.concat(taicpu.op_const_reg(A_MOVE,S_W,tprocdef(procdefinition).import_nr,NR_D0));
current_asmdata.CurrAsmList.concat(taicpu.op_const(A_TRAP,S_NO,tprocdef(procdefinition).extnumber));
end
else
internalerror(2017081201);
end;
else
internalerror(2004042901);
end;

View File

@ -2103,6 +2103,7 @@ procedure pd_syscall(pd:tabstractprocdef);
syscall: psyscallinfo;
begin
case target_info.system of
system_m68k_palmos,
system_m68k_atari,
system_m68k_amiga,
system_powerpc_amiga:
@ -2179,6 +2180,14 @@ begin
{$if defined(powerpc) or defined(m68k) or defined(i386) or defined(x86_64) or defined(arm)}
include_po_syscall;
if target_info.system = system_m68k_palmos then
begin
v:=get_intconst;
tprocdef(pd).import_nr:=longint(v.svalue);
tprocdef(pd).extnumber:=15;
exit;
end;
if target_info.system = system_m68k_atari then
begin
v:=get_intconst;

View File

@ -38,7 +38,7 @@ type
const
syscall_conventions: array[1..10] of tsyscallinfo = (
( token: NOTOKEN; procoption: po_syscall; validon: [system_m68k_atari] ),
( token: NOTOKEN; procoption: po_syscall; validon: [system_m68k_atari,system_m68k_palmos] ),
( token: _LEGACY; procoption: po_syscall_legacy; validon: [system_powerpc_morphos,system_m68k_amiga] ),
// old sysv naming, for compatibility only (on MorphOS/OS4)
( token: _SYSV; procoption: po_syscall_basenone; validon: [system_powerpc_morphos] ),
@ -72,7 +72,8 @@ type
end;
const
default_syscall_conventions: array[0..6] of tsyscalldefaultinfo = (
default_syscall_conventions: array[0..7] of tsyscalldefaultinfo = (
( system: system_m68k_palmos; procoption: po_syscall ),
( system: system_m68k_atari; procoption: po_syscall ),
( system: system_m68k_amiga; procoption: po_syscall_legacy ),
( system: system_powerpc_amiga; procoption: po_syscall_basefirst ),