RISCV 32 decoder encountered a segmentation fault #757
Replies: 2 comments
-
I tried not to use the compressed instruction set, but instruction '0x00478793' (addi a5,a5,4) also meets the same problem. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm glad you were able to solve this! What was the solution to this problem? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wrote a C program base RISCV 32 imc instruction set, and then I debug the program using gem5 simulator.
Something went wrong while the program was running, the gem5 got crushed while decoding the instruction '0x0791'.
Here is the log:
1752000: system.cpu.decoder: Requesting bytes 0x43980791 from address 0x7b8 <br> 1752000: system.cpu.decoder: emi is 0x10000000791 <br /> 1752000: system.cpu.decoder: emi is compressed <br /> <bad format>1752000: system.cpu.decoder: emi is 0x10000000791 <br /> 1752000: system.cpu.decoder: Decoding instruction 0x00000791 at address 0x7b8 <br /> gem5 has encountered a segmentation fault!
The '0x0791' is a compress instruction, which means
addi a5,a5,4
After I debuged the gem5, I found the function
src/riscv/decoder.cc/StaticInstPtr Decoder::decode(ExtMachInst mach_inst, Addr addr)
didn't perform as expected.I guess
StaticInstPtr &si = instMap[mach_inst];
cause the segmentation fault, but I don't know how to solve the program.Please help.
Beta Was this translation helpful? Give feedback.
All reactions