mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-02 02:49:32 +01:00
* aros64: recent developments hanged the library call ABI, lets try to follow it (aros64 is experimental)
This commit is contained in:
parent
4f3093657e
commit
568d4de77e
@ -2197,7 +2197,7 @@ procedure pd_syscall(pd:tabstractprocdef);
|
||||
system_i386_aros:
|
||||
result:='eax';
|
||||
system_x86_64_aros:
|
||||
result:='rax';
|
||||
result:='r12';
|
||||
system_powerpc_morphos:
|
||||
result:='r12';
|
||||
else
|
||||
|
||||
@ -81,7 +81,7 @@ const
|
||||
( system: system_powerpc_morphos; procoption: po_syscall_legacy ),
|
||||
( system: system_arm_aros; procoption: po_syscall_baselast ),
|
||||
( system: system_i386_aros; procoption: po_syscall_baselast ),
|
||||
( system: system_x86_64_aros; procoption: po_syscall_baselast ));
|
||||
( system: system_x86_64_aros; procoption: po_syscall_basereg ));
|
||||
|
||||
var
|
||||
default_syscall_convention: tprocoption = po_none;
|
||||
|
||||
@ -1659,6 +1659,21 @@ unit cpupara;
|
||||
begin
|
||||
hp:=tparavarsym(paras[i]);
|
||||
paradef:=hp.vardef;
|
||||
|
||||
{ in syscalls the libbase might be set as explicit paraloc }
|
||||
if (vo_has_explicit_paraloc in hp.varoptions) then
|
||||
if not (vo_is_syscall_lib in hp.varoptions) then
|
||||
internalerror(2022010501)
|
||||
else
|
||||
begin
|
||||
paracgsize:=def_cgsize(paradef);
|
||||
hp.paraloc[side].def:=paradef;
|
||||
hp.paraloc[side].size:=paracgsize;
|
||||
hp.paraloc[side].intsize:=tcgsize2size[paracgsize];
|
||||
hp.paraloc[side].alignment:=sizeof(pint);
|
||||
continue;
|
||||
end;
|
||||
|
||||
{ on win64, if a record has only one field and that field is a
|
||||
single or double, it has to be handled like a single/double }
|
||||
if use_ms_abi and
|
||||
|
||||
@ -61,11 +61,11 @@ implementation
|
||||
begin
|
||||
current_asmdata.CurrAsmList.concat(tai_comment.create(strpnew('AROS SysCall')));
|
||||
|
||||
cg.getcpuregister(current_asmdata.CurrAsmList,NR_RAX);
|
||||
get_syscall_call_ref(tmpref,NR_RAX);
|
||||
cg.getcpuregister(current_asmdata.CurrAsmList,NR_R12);
|
||||
get_syscall_call_ref(tmpref,NR_R12);
|
||||
|
||||
current_asmdata.CurrAsmList.concat(taicpu.op_ref(A_CALL,S_NO,tmpref));
|
||||
cg.ungetcpuregister(current_asmdata.CurrAsmList,NR_RAX);
|
||||
cg.ungetcpuregister(current_asmdata.CurrAsmList,NR_R12);
|
||||
exit;
|
||||
end;
|
||||
internalerror(2016120101);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user