Use SUPPORT_SAFECALL conditional

git-svn-id: trunk@22488 -
This commit is contained in:
pierre 2012-09-27 15:57:40 +00:00
parent f36c769c2f
commit 42586baa34
3 changed files with 9 additions and 3 deletions

View File

@ -169,6 +169,12 @@ implementation
{ true if uses a parameter as return value }
function tparamanager.ret_in_param(def : tdef;calloption : tproccalloption) : boolean;
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
(def.typ=recorddef) or
(def.typ=stringdef) or

View File

@ -68,7 +68,7 @@ implementation
(pd.proccalloption=pocall_safecall)) then
paranr:=paranr_result_leftright
else
{$elseif defined(x86) or defined(arm)}
{$elseif defined(SUPPORT_SAFECALL)}
if (tf_safecall_exceptions in target_info.flags) and
(pd.proccalloption = pocall_safecall) then
paranr:=paranr_result_leftright

View File

@ -1172,7 +1172,7 @@ implementation
procdef.parast.SymList.ForEachCall(@check_finalize_paras,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 }
if (tf_safecall_exceptions in target_info.flags) and
(procdef.proccalloption=pocall_safecall) then
@ -1464,7 +1464,7 @@ implementation
current_filepos:=entrypos;
gen_proc_entry_code(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 }
if not (cs_implicit_exceptions in current_settings.moduleswitches) and
(tf_safecall_exceptions in target_info.flags) and