mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-02 17:30:30 +02:00
* Set return value of safecall procedure if implicit try/finally blocks are disabled.
git-svn-id: trunk@7727 -
This commit is contained in:
parent
3b7792ead1
commit
9bbff8042f
@ -1034,6 +1034,12 @@ 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)}
|
||||||
|
{ Set return value of safecall procedure if implicit try/finally blocks are disabled }
|
||||||
|
if not (cs_implicit_exceptions in current_settings.moduleswitches) and
|
||||||
|
(procdef.proccalloption=pocall_safecall) then
|
||||||
|
cg.a_load_const_reg(aktproccode,OS_ADDR,0,NR_FUNCTION_RETURN_REG);
|
||||||
|
{$endif}
|
||||||
{ Add exit code at the end }
|
{ Add exit code at the end }
|
||||||
current_filepos:=exitpos;
|
current_filepos:=exitpos;
|
||||||
gen_proc_exit_code(templist);
|
gen_proc_exit_code(templist);
|
||||||
|
Loading…
Reference in New Issue
Block a user