rsd-devel / rsd

RSD: RISC-V Out-of-Order Superscalar Processor
Apache License 2.0
980 stars 98 forks source link

[Bug Report] Incorrect upward rounding result of fsub.s instruction #84

Open zhangkanqi opened 6 months ago

zhangkanqi commented 6 months ago

Hi,

When executing the fsub.s ft5, ft5, ft2, rup instruction in Spike, I found that the result is incorrect, where ft5 is initialized as 0x284d52df and ft2 is initialized as 0x7b418a35. I believe the correct final result in ft5 should be 0xfb418a34 (as Spike does), however, the result calculated in RSD is 0xfb418a35.

lpha-z commented 6 months ago

Thanks for your bug report. The current implementation of the floating-point arithmetic unit does not support directional rounding (so really it does not fully support RV32F). We plan to add support for directional rounding in the near future.

zhangkanqi commented 6 months ago

I see. Thanks a lot.

lpha-z commented 6 months ago

We reopen this report because we believe it will help others who have faced similar problems. When we finish supporting the directional rounding, we will close this report.