mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-12 05:09:20 +02:00
* ensure that the loading of the uninitialised function result for llvm
doesn't result in a temp allocation, since this can happen while generating the exit code git-svn-id: trunk@30711 -
This commit is contained in:
parent
5418978415
commit
70ffaba901
@ -1114,14 +1114,20 @@ implementation
|
||||
|
||||
|
||||
procedure thlcgllvm.gen_load_uninitialized_function_result(list: TAsmList; pd: tprocdef; resdef: tdef; const resloc: tcgpara);
|
||||
var
|
||||
reg: tregister;
|
||||
begin
|
||||
if not paramanager.ret_in_param(resdef,pd) then
|
||||
begin
|
||||
reg:=getregisterfordef(list,resdef);
|
||||
list.concat(taillvm.op_reg_size_undef(la_bitcast,reg,resdef));
|
||||
a_load_reg_cgpara(list,resdef,reg,resloc);
|
||||
case resloc.location^.loc of
|
||||
LOC_REGISTER,
|
||||
LOC_FPUREGISTER,
|
||||
LOC_MMREGISTER:
|
||||
begin
|
||||
resloc.check_simple_location;
|
||||
list.concat(taillvm.op_reg_size_undef(la_bitcast,resloc.location^.register,resloc.location^.def));
|
||||
end;
|
||||
else
|
||||
internalerror(2015042301);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user