mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-22 19:29:09 +02:00
* made fpc_setjmp() code generic and fixed it for llvm
git-svn-id: trunk@30497 -
This commit is contained in:
parent
23b95cc291
commit
a674804869
@ -451,15 +451,13 @@ implementation
|
|||||||
paramanager.freecgpara(list,paraloc1);
|
paramanager.freecgpara(list,paraloc1);
|
||||||
{ perform the fpc_setjmp call }
|
{ perform the fpc_setjmp call }
|
||||||
setjmpres:=hlcg.g_call_system_proc(list,pd,[@paraloc1],nil);
|
setjmpres:=hlcg.g_call_system_proc(list,pd,[@paraloc1],nil);
|
||||||
setjmpres.check_simple_location;
|
location_reset(tmpresloc,LOC_REGISTER,def_cgsize(setjmpres.def));
|
||||||
if setjmpres.location^.loc<>LOC_REGISTER then
|
tmpresloc.register:=hlcg.getaddressregister(list,pushexceptres.def);
|
||||||
internalerror(2014080701);
|
hlcg.gen_load_cgpara_loc(list,pushexceptres.def,setjmpres,tmpresloc,true);
|
||||||
hlcg.getcpuregister(list,setjmpres.location^.register);
|
hlcg.g_exception_reason_save(list,setjmpres.def,ossinttype,tmpresloc.register,t.reasonbuf);
|
||||||
hlcg.g_exception_reason_save(list,setjmpres.def,ossinttype,setjmpres.location^.register,t.reasonbuf);
|
|
||||||
{ if we get 0 here in the function result register, it means that we
|
{ if we get 0 here in the function result register, it means that we
|
||||||
longjmp'd back here }
|
longjmp'd back here }
|
||||||
hlcg.a_cmp_const_reg_label(list,setjmpres.def,OC_NE,0,setjmpres.location^.register,exceptlabel);
|
hlcg.a_cmp_const_reg_label(list,setjmpres.def,OC_NE,0,tmpresloc.register,exceptlabel);
|
||||||
hlcg.ungetcpuregister(list,setjmpres.location^.register);
|
|
||||||
setjmpres.resetiftemp;
|
setjmpres.resetiftemp;
|
||||||
paraloc1.done;
|
paraloc1.done;
|
||||||
paraloc2.done;
|
paraloc2.done;
|
||||||
|
Loading…
Reference in New Issue
Block a user