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

关于“nemu_trap”指令的一些疑惑。 #247

Open
Jeacy opened this issue Jan 4, 2024 · 1 comment
Open

关于“nemu_trap”指令的一些疑惑。 #247

Jeacy opened this issue Jan 4, 2024 · 1 comment
Assignees

Comments

@Jeacy
Copy link

Jeacy commented Jan 4, 2024

我在使用NEMU执行riscv-dv生成的bin文件时出现nemu无法正常退出的情况。具体表现为nemu卡死。
经过分析ready-to-run下通过am生成的bin文件,发现程序结束时均指向了nemu的自定义指令:nemu_trap
image
其编码为5006b,但是在nemu源码以及香山文档中该指令的编码为6b。
企业微信截图_588de547-8afe-49d4-8aee-df5306c0680b
企业微信截图_1704350744314

请问编码是以哪个为准?我尝试了5006b后nemu能够跑通riscv-dv的程序。

@xyyy1420
Copy link
Contributor

您好,请以0x6b为准;
由于指令解码的问题,0x5006b也被视为nemu_trap,但是以文档为准,应该使用0x6b。

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

2 participants