The mulhsu instruction actually returns the lower bits of the multiplication result, not the higher bits.
For the operation:
Input:
x1 = 0xabababab, x3 = 0xa36566c8
Output:
x20 = 0x1ffb3f98
Expected result (from Spike reference):
x20 = 0xca2ce72d
Mathematically correct result: (signed)0xabababab * (unsigned)0xa36566c8 = 0xca2ce72d_1ffb3f98
Please refer to our PoC for reproduction: https://github.com/gpu-experimental/poc-ventus-b30
It appears that the GVM has crashed.
[RTL error]@3515 GVM error in `gvm_t::getDutXRegWbFinish`: xreg writeback for instruction that does not care for retire
getDutXRegWbFinish Error: sm_id: 0, hardware_warp_id: 0, dispatch_id: 45, pc: 0x800000d4, insn: 0x0230a333
poc.out: /home/ain/fuzz_gpgpu/poc/ventus-env/gpgpu/sim-verilator/gvm.cpp:212: void gvm_t::getDutXRegWbFinish(): Assertion `isInsnCare(item.insn, retire_care_insns)' failed.
Thank you for your hard work!
The mulhsu instruction actually returns the lower bits of the multiplication result, not the higher bits.
For the operation:
Input:
x1 = 0xabababab, x3 = 0xa36566c8
Output:
x20 = 0x1ffb3f98
Expected result (from Spike reference):
x20 = 0xca2ce72d
Mathematically correct result: (signed)0xabababab * (unsigned)0xa36566c8 = 0xca2ce72d_1ffb3f98
Please refer to our PoC for reproduction: https://github.com/gpu-experimental/poc-ventus-b30
It appears that the GVM has crashed.
Thank you for your hard work!