* factor out first_addfloat_soft

git-svn-id: trunk@44540 -
This commit is contained in:
florian 2020-04-03 20:15:24 +00:00
parent fa4cbc89a5
commit 66cbee5e31

View File

@ -92,6 +92,10 @@ interface
the code generation phase.
}
function first_addfloat : tnode; virtual;
{
generates softfloat code for the node
}
function first_addfloat_soft: tnode; virtual;
private
{ checks whether a muln can be calculated as a 32bit }
{ * 32bit -> 64 bit }
@ -3623,26 +3627,14 @@ implementation
end;
function taddnode.first_addfloat : tnode;
function taddnode.first_addfloat_soft : tnode;
var
procname: string[31];
{ do we need to reverse the result ? }
notnode : boolean;
fdef : tdef;
begin
result := nil;
notnode := false;
fdef := nil;
{ In non-emulation mode, real opcodes are
emitted for floating point values.
}
if not ((cs_fp_emulation in current_settings.moduleswitches)
{$ifdef cpufpemu}
or (current_settings.fputype=fpu_soft)
{$endif cpufpemu}
) then
exit;
notnode:=false;
if not(target_info.system in systems_wince) then
begin
case tfloatdef(left.resultdef).floattype of
@ -3741,7 +3733,6 @@ implementation
else
internalerror(2005082602);
end;
end;
{ cast softfpu result? }
if not(target_info.system in systems_wince) then
@ -3764,6 +3755,21 @@ implementation
result:=cnotnode.create(result);
end;
function taddnode.first_addfloat : tnode;
begin
result := nil;
{ In non-emulation mode, real opcodes are
emitted for floating point values.
}
if not ((cs_fp_emulation in current_settings.moduleswitches)
{$ifdef cpufpemu}
or (current_settings.fputype=fpu_soft)
{$endif cpufpemu}
) then
exit;
result:=first_addfloat_soft
end;
{$ifdef cpuneedsmulhelper}
function taddnode.use_mul_helper: boolean;