Here's a test case:
_start:
lui ra, 2
csrs mstatus, ra
_test:
li t0, 0x40e6a09e66689b2e
fmv.d.x f0, t0
fcvt.w.d a0, f0, rmm
Piccolo rounds down to 0xb504, while spike rounds up to 0xb505. I believe that spike is correct.
(If you're wondering where the strange constant came from, it's sqrt(MAXINT), but I think that isn't important for this bug).
Here's a test case:
_start:
lui ra, 2
csrs mstatus, ra
_test:
li t0, 0x40e6a09e66689b2e
fmv.d.x f0, t0
fcvt.w.d a0, f0, rmm
Piccolo rounds down to 0xb504, while spike rounds up to 0xb505. I believe that spike is correct.
(If you're wondering where the strange constant came from, it's sqrt(MAXINT), but I think that isn't important for this bug).