Open fly-1011 opened 5 hours ago
When testing Xiangshan using NEMU as a reference model, many of my test cases showed inconsistencies similar to the following:
At first I thought it was a NEMU-related issue. But I tested it with the following assembly instructions:
.section .text .globl _start _start: li t0, 0x8000000a00100a00 csrw mstatus, t0 .word 0x9efd
The following is a screenshot of the log information:
When I use spike for debugging, .word 0x9efd corresponds to the unknown instruction:
XiangShan :commit dd02bc3f0e1adcf5fbaee614420772a94ccc0226 (HEAD -> master, origin/master, origin/HEAD) ready-to-run: commit a449a38534ec8330842ad5e975b872686b421ebc (HEAD, origin/master, origin/HEAD) nemu: 39f546c42275cb9bc2f74170e7ff6486c98ef4c9
This a bug related to Zcb decode.
https://github.com/OpenXiangShan/rocket-chip/blob/d24ca81a61727157ae8b7768b24b9cdbb1ddc8dd/src/main/scala/rocket/RVC.scala#L222-#L227
Thank you for your timely response and for confirming the bug.
Before start
Describe the question
When testing Xiangshan using NEMU as a reference model, many of my test cases showed inconsistencies similar to the following:
At first I thought it was a NEMU-related issue. But I tested it with the following assembly instructions:
The following is a screenshot of the log information:
When I use spike for debugging, .word 0x9efd corresponds to the unknown instruction:
Version Information
XiangShan :commit dd02bc3f0e1adcf5fbaee614420772a94ccc0226 (HEAD -> master, origin/master, origin/HEAD) ready-to-run: commit a449a38534ec8330842ad5e975b872686b421ebc (HEAD, origin/master, origin/HEAD) nemu: 39f546c42275cb9bc2f74170e7ff6486c98ef4c9