* 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:
Jonas Maebe 2015-04-25 15:51:04 +00:00
parent 5418978415
commit 70ffaba901

View File

@ -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;