+ ret in param fix for tinlinenode.first_sqrt_real

git-svn-id: branches/z80@45014 -
This commit is contained in:
nickysn 2020-04-23 00:11:17 +00:00
parent 0b19d4235f
commit 5200ff5e49

View File

@ -4215,14 +4215,19 @@ implementation
fdef: tdef; fdef: tdef;
procname: string[31]; procname: string[31];
callnode: tcallnode; callnode: tcallnode;
temp_pnode: pnode;
begin begin
if left.nodetype = callparan then
temp_pnode := @tcallparanode(left).left
else
temp_pnode := @left;
if ((cs_fp_emulation in current_settings.moduleswitches) if ((cs_fp_emulation in current_settings.moduleswitches)
{$ifdef cpufpemu} {$ifdef cpufpemu}
or (current_settings.fputype=fpu_soft) or (current_settings.fputype=fpu_soft)
{$endif cpufpemu} {$endif cpufpemu}
) and not (target_info.system in systems_wince) then ) and not (target_info.system in systems_wince) then
begin begin
case tfloatdef(left.resultdef).floattype of case tfloatdef(temp_pnode^.resultdef).floattype of
s32real: s32real:
begin begin
fdef:=search_system_type('FLOAT32REC').typedef; fdef:=search_system_type('FLOAT32REC').typedef;
@ -4240,18 +4245,18 @@ implementation
internalerror(2014052101); internalerror(2014052101);
end; end;
result:=ctypeconvnode.create_internal(ccallnode.createintern(procname,ccallparanode.create( result:=ctypeconvnode.create_internal(ccallnode.createintern(procname,ccallparanode.create(
ctypeconvnode.create_internal(left,fdef),nil)),resultdef); ctypeconvnode.create_internal(temp_pnode^,fdef),nil)),resultdef);
end end
else else
begin begin
{ create the call to the helper } { create the call to the helper }
{ on entry left node contains the parameter } { on entry left node contains the parameter }
callnode := ccallnode.createintern('fpc_sqrt_real', callnode := ccallnode.createintern('fpc_sqrt_real',
ccallparanode.create(left,nil)); ccallparanode.create(temp_pnode^,nil));
result := ctypeconvnode.create(callnode,resultdef); result := ctypeconvnode.create(callnode,resultdef);
include(callnode.callnodeflags,cnf_check_fpu_exceptions); include(callnode.callnodeflags,cnf_check_fpu_exceptions);
end; end;
left := nil; temp_pnode^ := nil;
end; end;
function tinlinenode.first_ln_real : tnode; function tinlinenode.first_ln_real : tnode;