Ver código fonte

Use round to convert float constant into s64comp type for LLVM compiler as is done in general case

Pierre Muller 3 anos atrás
pai
commit
69d40dd17a
1 arquivos alterados com 1 adições e 3 exclusões
  1. 1 3
      compiler/llvm/nllvmcon.pas

+ 1 - 3
compiler/llvm/nllvmcon.pas

@@ -199,9 +199,7 @@ implementation
            s32real,s64real:
              current_asmdata.CurrAsmList.concat(taillvm.op_reg_size_fpconst_size(la_bitcast,location.register,resultdef,value_real,resultdef));
            { comp and currency are handled as int64 at the llvm level }
-           s64comp:
-             { sc80floattype instead of resultdef, see comment in thlcgllvm.a_loadfpu_ref_reg }
-             current_asmdata.CurrAsmList.concat(taillvm.op_reg_size_const_size(la_sitofp,location.register,s64inttype,trunc(value_real),sc80floattype));
+           s64comp,
            s64currency:
              { sc80floattype instead of resultdef, see comment in thlcgllvm.a_loadfpu_ref_reg }
              current_asmdata.CurrAsmList.concat(taillvm.op_reg_size_const_size(la_sitofp,location.register,s64inttype,round(value_real),sc80floattype));