palmos: for C and syscall functions, expect return values in A0. mark D2 and A2 as volatile during function calls

git-svn-id: trunk@37896 -
This commit is contained in:
Károly Balogh 2018-01-04 07:52:11 +00:00
parent 58d98d8cd7
commit 9f974369a1

View File

@ -80,6 +80,8 @@ unit cpupara;
begin
{ d0 and d1 are considered volatile }
Result:=VOLATILE_INTREGISTERS;
if target_info.system in [system_m68k_palmos] then
include(result,RS_D2);
end;
@ -87,6 +89,8 @@ unit cpupara;
begin
{ a0 and a1 are considered volatile }
Result:=VOLATILE_ADDRESSREGISTERS;
if target_info.system in [system_m68k_palmos] then
include(result,RS_A2);
end;
function tcpuparamanager.get_volatile_registers_fpu(calloption:tproccalloption):tcpuregisterset;
@ -240,8 +244,8 @@ unit cpupara;
We also have to figure out a better switch for this, because this is
now compiler and platform specific... (KB) }
if (tprocdef(p).proccalloption in [pocall_cdecl,pocall_cppdecl]) and
(target_info.system in [system_m68k_linux]) and
if (tprocdef(p).proccalloption in [pocall_syscall,pocall_cdecl,pocall_cppdecl]) and
(target_info.system in [system_m68k_palmos,system_m68k_linux]) and
assigned(result.def) and
(result.def.typ in [stringdef,pointerdef,classrefdef,objectdef,
procvardef,procdef,arraydef,formaldef]) then