* use fld1/fchs regardless of pic

This commit is contained in:
florian 2024-06-06 22:36:11 +02:00
parent d1a5ecd87e
commit 15b3f16646

View File

@ -51,8 +51,8 @@ implementation
function tx86realconstnode.pass_1 : tnode; function tx86realconstnode.pass_1 : tnode;
begin begin
result:=nil; result:=nil;
if is_number_float(value_real) and not(use_vectorfpu(resultdef)) and ((value_real=1.0) or ((value_real=0.0) and (get_real_sign(value_real)=1)) or if is_number_float(value_real) and not(use_vectorfpu(resultdef)) and ((value_real=1.0) or (value_real=-1.0) or ((value_real=0.0) and (get_real_sign(value_real)=1)) or
(((value_real=2.0) or (value_real=-1.0)) and (cs_create_pic in current_settings.moduleswitches))) then ((value_real=2.0) and (cs_create_pic in current_settings.moduleswitches))) then
expectloc:=LOC_FPUREGISTER expectloc:=LOC_FPUREGISTER
else if (value_real=0.0) and (get_real_sign(value_real)=1) and use_vectorfpu(resultdef) then else if (value_real=0.0) and (get_real_sign(value_real)=1) and use_vectorfpu(resultdef) then
expectloc:=LOC_MMREGISTER expectloc:=LOC_MMREGISTER
@ -80,7 +80,7 @@ implementation
location.register:=NR_ST; location.register:=NR_ST;
tcgx86(cg).inc_fpu_stack; tcgx86(cg).inc_fpu_stack;
end end
else if (value_real=-1.0) and (cs_create_pic in current_settings.moduleswitches) and not(use_vectorfpu(resultdef)) then else if (value_real=-1.0) and not(use_vectorfpu(resultdef)) then
begin begin
emit_none(A_FLD1,S_NO); emit_none(A_FLD1,S_NO);
emit_none(A_FCHS,S_NO); emit_none(A_FCHS,S_NO);