Skip to content

Commit

Permalink
fix: repair code to build under nightly 2024-05-02 for ArceOS project
Browse files Browse the repository at this point in the history
Signed-off-by: Zhouqi Jiang <[email protected]>
  • Loading branch information
luojia65 committed Oct 23, 2024
1 parent e2a1a3e commit a7207d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/detect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ struct TrapFrame {
// handle exceptions only rather than interrupts.
#[naked]
unsafe extern "C" fn on_detect_trap() -> ! {
core::arch::naked_asm!(
asm!(
".p2align 2",
"addi sp, sp, -8*21",
"sd ra, 0*8(sp)",
Expand Down Expand Up @@ -205,5 +205,6 @@ unsafe extern "C" fn on_detect_trap() -> ! {
"addi sp, sp, 8*21",
"sret",
rust_detect_trap = sym rust_detect_trap,
options(noreturn),
)
}
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#![feature(doc_cfg)]
#![feature(naked_functions)]
#![feature(riscv_ext_intrinsics)]
#![feature(asm_const)]
#![doc = include_str!("../README.md")]

#[macro_use]
Expand Down

0 comments on commit a7207d8

Please sign in to comment.