mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-26 16:32:18 +02:00
Use SUPPORT_SAFECALL conditional
git-svn-id: trunk@22488 -
This commit is contained in:
parent
f36c769c2f
commit
42586baa34
@ -169,6 +169,12 @@ implementation
|
|||||||
{ true if uses a parameter as return value }
|
{ true if uses a parameter as return value }
|
||||||
function tparamanager.ret_in_param(def : tdef;calloption : tproccalloption) : boolean;
|
function tparamanager.ret_in_param(def : tdef;calloption : tproccalloption) : boolean;
|
||||||
begin
|
begin
|
||||||
|
if (tf_safecall_exceptions in target_info.flags) and
|
||||||
|
(calloption=pocall_safecall) then
|
||||||
|
begin
|
||||||
|
result:=true;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
ret_in_param:=((def.typ=arraydef) and not(is_dynamic_array(def))) or
|
ret_in_param:=((def.typ=arraydef) and not(is_dynamic_array(def))) or
|
||||||
(def.typ=recorddef) or
|
(def.typ=recorddef) or
|
||||||
(def.typ=stringdef) or
|
(def.typ=stringdef) or
|
||||||
|
@ -68,7 +68,7 @@ implementation
|
|||||||
(pd.proccalloption=pocall_safecall)) then
|
(pd.proccalloption=pocall_safecall)) then
|
||||||
paranr:=paranr_result_leftright
|
paranr:=paranr_result_leftright
|
||||||
else
|
else
|
||||||
{$elseif defined(x86) or defined(arm)}
|
{$elseif defined(SUPPORT_SAFECALL)}
|
||||||
if (tf_safecall_exceptions in target_info.flags) and
|
if (tf_safecall_exceptions in target_info.flags) and
|
||||||
(pd.proccalloption = pocall_safecall) then
|
(pd.proccalloption = pocall_safecall) then
|
||||||
paranr:=paranr_result_leftright
|
paranr:=paranr_result_leftright
|
||||||
|
@ -1172,7 +1172,7 @@ implementation
|
|||||||
procdef.parast.SymList.ForEachCall(@check_finalize_paras,nil);
|
procdef.parast.SymList.ForEachCall(@check_finalize_paras,nil);
|
||||||
procdef.localst.SymList.ForEachCall(@check_finalize_locals,nil);
|
procdef.localst.SymList.ForEachCall(@check_finalize_locals,nil);
|
||||||
|
|
||||||
{$if defined(x86) or defined(arm)}
|
{$ifdef SUPPORT_SAFECALL}
|
||||||
{ set implicit_finally flag for if procedure is safecall }
|
{ set implicit_finally flag for if procedure is safecall }
|
||||||
if (tf_safecall_exceptions in target_info.flags) and
|
if (tf_safecall_exceptions in target_info.flags) and
|
||||||
(procdef.proccalloption=pocall_safecall) then
|
(procdef.proccalloption=pocall_safecall) then
|
||||||
@ -1464,7 +1464,7 @@ implementation
|
|||||||
current_filepos:=entrypos;
|
current_filepos:=entrypos;
|
||||||
gen_proc_entry_code(templist);
|
gen_proc_entry_code(templist);
|
||||||
aktproccode.insertlistafter(headertai,templist);
|
aktproccode.insertlistafter(headertai,templist);
|
||||||
{$if defined(x86) or defined(arm)}
|
{$ifdef SUPPORT_SAFECALL}
|
||||||
{ Set return value of safecall procedure if implicit try/finally blocks are disabled }
|
{ Set return value of safecall procedure if implicit try/finally blocks are disabled }
|
||||||
if not (cs_implicit_exceptions in current_settings.moduleswitches) and
|
if not (cs_implicit_exceptions in current_settings.moduleswitches) and
|
||||||
(tf_safecall_exceptions in target_info.flags) and
|
(tf_safecall_exceptions in target_info.flags) and
|
||||||
|
Loading…
Reference in New Issue
Block a user