mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 20:20:47 +02:00
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:
parent
58d98d8cd7
commit
9f974369a1
@ -80,6 +80,8 @@ unit cpupara;
|
|||||||
begin
|
begin
|
||||||
{ d0 and d1 are considered volatile }
|
{ d0 and d1 are considered volatile }
|
||||||
Result:=VOLATILE_INTREGISTERS;
|
Result:=VOLATILE_INTREGISTERS;
|
||||||
|
if target_info.system in [system_m68k_palmos] then
|
||||||
|
include(result,RS_D2);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -87,6 +89,8 @@ unit cpupara;
|
|||||||
begin
|
begin
|
||||||
{ a0 and a1 are considered volatile }
|
{ a0 and a1 are considered volatile }
|
||||||
Result:=VOLATILE_ADDRESSREGISTERS;
|
Result:=VOLATILE_ADDRESSREGISTERS;
|
||||||
|
if target_info.system in [system_m68k_palmos] then
|
||||||
|
include(result,RS_A2);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function tcpuparamanager.get_volatile_registers_fpu(calloption:tproccalloption):tcpuregisterset;
|
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
|
We also have to figure out a better switch for this, because this is
|
||||||
now compiler and platform specific... (KB) }
|
now compiler and platform specific... (KB) }
|
||||||
|
|
||||||
if (tprocdef(p).proccalloption in [pocall_cdecl,pocall_cppdecl]) and
|
if (tprocdef(p).proccalloption in [pocall_syscall,pocall_cdecl,pocall_cppdecl]) and
|
||||||
(target_info.system in [system_m68k_linux]) and
|
(target_info.system in [system_m68k_palmos,system_m68k_linux]) and
|
||||||
assigned(result.def) and
|
assigned(result.def) and
|
||||||
(result.def.typ in [stringdef,pointerdef,classrefdef,objectdef,
|
(result.def.typ in [stringdef,pointerdef,classrefdef,objectdef,
|
||||||
procvardef,procdef,arraydef,formaldef]) then
|
procvardef,procdef,arraydef,formaldef]) then
|
||||||
|
Loading…
Reference in New Issue
Block a user