z port: round toward 0 for float -> int conversions.

master
Xavier Leroy 2015-10-31 06:47:50 -04:00
parent 2cdb50009b
commit 89475be999
1 changed files with 2 additions and 1 deletions

View File

@ -519,7 +519,8 @@ let emit_instr i =
| Lop(Ifloatofint) ->
` cdgbr {emit_reg i.res.(0)}, {emit_reg i.arg.(0)}\n`
| Lop(Iintoffloat) ->
` cgdbr {emit_reg i.res.(0)}, 0, {emit_reg i.arg.(0)}\n`
(* rounding method #5 = round toward 0 *)
` cgdbr {emit_reg i.res.(0)}, 5, {emit_reg i.arg.(0)}\n`
| Lop(Ispecific sop) ->
assert (i.arg.(2).loc = i.res.(0).loc);
let instr = name_for_specific sop in