Ver Fonte

* avoid that -0.0 is handled by the eor optimization

git-svn-id: trunk@42921 -
florian há 6 anos atrás
pai
commit
a019536cd5
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      compiler/aarch64/ncpucon.pas

+ 2 - 1
compiler/aarch64/ncpucon.pas

@@ -72,7 +72,8 @@ interface
             current_asmdata.CurrAsmList.concat(taicpu.op_reg_realconst(A_FMOV,
               location.register,value_real));
           end
-        else if value_real=0.0 then
+        { cast and compare the bit pattern as we cannot handle -0.0 }
+        else if bestrealrec(value_real).Data=0 then
           begin
             location_reset(location,LOC_MMREGISTER,def_cgsize(resultdef));
             location.register:=cg.getmmregister(current_asmdata.CurrAsmList,location.size);