mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-16 04:50:51 +01:00
* cleanup stack on i386 after call to fpc_psabi_begin_catch
git-svn-id: branches/debug_eh@41454 -
This commit is contained in:
parent
82e1ce8e4a
commit
77615cd3c0
@ -121,7 +121,11 @@ implementation
|
||||
parabase,paramgr,
|
||||
hlcgobj,
|
||||
pass_2,
|
||||
ncgflw;
|
||||
ncgflw
|
||||
{$ifdef i386}
|
||||
,aasmcpu
|
||||
{$endif i386}
|
||||
;
|
||||
|
||||
|
||||
type
|
||||
@ -616,6 +620,7 @@ implementation
|
||||
hlcg.a_load_reg_cgpara(list,voidpointertype,t.unwind_info,cgpara1);
|
||||
paramanager.freecgpara(list,cgpara1);
|
||||
hlcg.g_call_system_proc(current_asmdata.CurrAsmList,'fpc_resume',[@cgpara1],nil).resetiftemp;
|
||||
{ we do not have to clean up the stack, we never return }
|
||||
cgpara1.done;
|
||||
|
||||
psabiehprocinfo.CreateNewPSABIEHCallsite(list);
|
||||
@ -708,6 +713,11 @@ implementation
|
||||
paramanager.getintparaloc(list, pd, 1, paraloc1);
|
||||
hlcg.a_load_reg_cgpara(list,voidpointertype,wrappedexception,paraloc1);
|
||||
begincatchres:=hlcg.g_call_system_proc(list,pd,[@paraloc1],nil);
|
||||
{$ifdef i386}
|
||||
{ fpc_psabi_begin_catch is cdecl, not sure how to do this properly }
|
||||
current_asmdata.CurrAsmList.concat(taicpu.op_const_reg(A_ADD,S_L,4,NR_ESP));
|
||||
{$endif i386}
|
||||
|
||||
location_reset(exceptloc, LOC_REGISTER, def_cgsize(begincatchres.def));
|
||||
exceptloc.register:=hlcg.getaddressregister(list, begincatchres.def);
|
||||
hlcg.gen_load_cgpara_loc(list, begincatchres.def, begincatchres, exceptloc, true);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user