mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-06 07:30:54 +02:00
Fix safecall for cpus for which NR_FUNCTION_RESULT_REG is different from NR_FUNCTION_RETURN_REG
git-svn-id: trunk@22489 -
This commit is contained in:
parent
42586baa34
commit
18698bc93d
@ -1459,6 +1459,7 @@ implementation
|
||||
paramanager.freecgpara(current_asmdata.CurrAsmList,cgpara);
|
||||
cgpara.done;
|
||||
cg.g_call(current_asmdata.CurrAsmList,'FPC_SAFECALLHANDLER');
|
||||
cg.a_load_reg_reg(current_asmdata.CurrAsmList,OS_INT,OS_INT,NR_FUNCTION_RESULT_REG, NR_FUNCTION_RETURN_REG);
|
||||
end;
|
||||
|
||||
procedure tcgtryfinallynode.pass_generate_code;
|
||||
@ -1561,13 +1562,11 @@ implementation
|
||||
CGMessage(cg_e_control_flow_outside_finally);
|
||||
if codegenerror then
|
||||
exit;
|
||||
{$if defined(x86) or defined(arm)}
|
||||
if (tf_safecall_exceptions in target_info.flags) and
|
||||
(current_procinfo.procdef.proccalloption=pocall_safecall) then
|
||||
handle_safecall_exception
|
||||
else
|
||||
{$endif}
|
||||
cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RERAISE',false);
|
||||
cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RERAISE',false);
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user