Browse Source

* avoid that -0.0 is handled by the eor optimization

git-svn-id: trunk@42921 -
florian 6 years ago
parent
commit
a019536cd5
1 changed files with 2 additions and 1 deletions
  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);