瀏覽代碼

* avoid that -0.0 is handled by the eor optimization

git-svn-id: trunk@42921 -
florian 6 年之前
父節點
當前提交
a019536cd5
共有 1 個文件被更改,包括 2 次插入1 次删除
  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);