OpenXiangShan / XiangShan

Open-source high-performance RISC-V processor
https://xiangshan.cc
Other
4.92k stars 666 forks source link

Sign bit handling error #3951

Open fly-1011 opened 1 day ago

fly-1011 commented 1 day ago

Before start

Describe the bug

When executing fadd.h ft0, fa0, fa0 instruction, the value of fa0 is 0xffffffffffff8000 (-0.0 in half precision format), and the results of Xiangshan and nemu are different.

Expected behavior

Log information: image image image

The log information of spike is also shown above

To Reproduce

Initialize fa0: 0xffffffffffff8000 Execute fadd.h ft0, fa0, fa0

Environment

Additional context

No response

HeiHuDie commented 1 day ago

Thanks, this is a known bug and has been fixed, but it has not been merged into master

fly-1011 commented 1 day ago

Thank you for your reply. Thanks to your reminder, I noticed that the fix has been made in the yunsuan module, but it hasn't been merged into Xiangshan yet. I’m looking forward to the merge!😄