bluespec / Piccolo

RISC-V CPU, simple 3-stage pipeline, for low-end applications (e.g., embedded, IoT)
Apache License 2.0
301 stars 48 forks source link

fcvt.wu.s of negative zero #23

Open michael-roe opened 4 years ago

michael-roe commented 4 years ago

fcvt.wu.s of negative zero of IEEE negative zero sets FCSR.NV, Spike doesn't set the flag. I believe that what spike does is the correct IEEE 754:2008 behaviour.

Here's a test: .global _start _start: lui ra, 2 csrs mstatus, ra fmv.w.x ft0, zero test: fsgnjn.s f0, f0, f0 fcvt.wu.s t0, f0, rtz csrrs a0, fcsr, zero