-
Notifications
You must be signed in to change notification settings - Fork 16
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
动态内存分配 · GitBook #14
Comments
可以有一道小题目,kernel截获除零异常。 |
RISC-V 中除零不会触发异常,可以改为截获非法指令异常(例如 |
这里直接用 trap_handler 可能会有 trap_handler 并非四字节对齐的问题。 |
文档中riscv依赖也还是没有支持rustc1.45.0 nightly,fork修改了一下由于是rustc版本问题就不pr了,将git依赖替换成如下https://github.com/qwtsc/riscv 即可,Rust丢弃asm宏相关的PR |
这个你可以用#[naked]函数。比如我这个abort函数:https://rust.godbolt.org/z/MYvZR4 |
使用nightly 2020-01-26版本的话,一直显示cannot find llvm_asm macro(感觉理论上不应该),后来用了最新的nightly(06-24),再把sbi.rs, init.rs等里面的asm!(..)改成llvm_asm!(..)就好了 |
注意 该依赖似乎放弃了riscv = { git = "https://github.com/rcore-os/riscv", features = ["inline-asm"] } 中 asm!的写法,而转成了llvm_asm! @wtyytw0 的意见修改可以成功运行,但同时需要在lib.rs 中加入 |
https://wyfcyx.github.io/rCore_tutorial_doc/chapter3/part2.html
The text was updated successfully, but these errors were encountered: