Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spike executed an instruction that does not meet expectations. #1935

Open
ha0lyu opened this issue Mar 11, 2025 · 2 comments
Open

Spike executed an instruction that does not meet expectations. #1935

ha0lyu opened this issue Mar 11, 2025 · 2 comments

Comments

@ha0lyu
Copy link

ha0lyu commented Mar 11, 2025

During testing with Spike, I noticed that the instruction at pc = 0x800005ac differs from the one executed by Spike.
Image

As observed, the register has become hstatus, which is not the expected value.
Image

test.zip

@DavidYu360
Copy link

DavidYu360 commented Mar 12, 2025

  1. The trace in the post contains hypervisor-related CSR, and maybe the spike is not set for supporting hypervisor. That is the possible reason why spike raises illegal instruction exception.
  2. I can not find the instruction "csrr sp, hstatus" in the dump or elf file, please have a check if the ELF file in the attachment is the "real" elf file you fed to spike.

@heiyuen1999
Copy link

Check whether there is a store that modifies the highest byte of the address 0x800005ac.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants