Open michael-roe opened 4 years ago
If the rounding mode is set to round up, fcvt.wu.d of a denormalized value rounds down to zero rather than rounding up to 1. (Spike gets this right).
Here's a test:
.global _start _start: lui ra, 2 csrs mstatus, ra
_test: li t0, 0x10 fmv.d.x f1, t0 fcvt.wu.d a0, f1, rup
If the rounding mode is set to round up, fcvt.wu.d of a denormalized value rounds down to zero rather than rounding up to 1. (Spike gets this right).
Here's a test:
.global _start _start: lui ra, 2 csrs mstatus, ra
_test: li t0, 0x10 fmv.d.x f1, t0 fcvt.wu.d a0, f1, rup