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

【提问(已解决)】关于执行mret指令时difftest报错的问题 #17

Open
shili2017 opened this issue Aug 19, 2021 · 1 comment

Comments

@shili2017
Copy link

mstatus different at pc = 0x00800005f4, right= 0x0000000000000088, wrong = 0x0000000000001888

执行mret指令时,在我们的实现里始终保持在machine mode,但是difftest给出的默认实现是返回到user mode(见mstatus中的mpp field),需要在difftest中修改源码吗?具体是在哪里修改?

(QQ群中有人提出类似问题但是聊天记录中没有具体回答)

@shili2017 shili2017 changed the title 【提问】执行mret指令时difftest报错 【提问(已解决)】关于执行mret指令时difftest报错的问题 Aug 19, 2021
@shili2017
Copy link
Author

我自己的solution:需要修改NEMU源码,在src/isa/riscv64/system/priv.c:179,把MODE_U改成MODE_M即可。

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

1 participant