Skip to content

Commit 198fe7b

Browse files
committed
fix(rt): use #[unsafe(naked)] macro which is to be stablized in rustc
Naked functions are to be stablized in this pull request: rust-lang/rust#134213 Signed-off-by: Zhouqi Jiang <[email protected]>
1 parent 376b057 commit 198fe7b

File tree

4 files changed

+194
-204
lines changed

4 files changed

+194
-204
lines changed

bouffalo-rt/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ cfg-if = "1.0.0"
1313
embedded-time = "0.12.1"
1414
plic = "0.0.2"
1515
xuantie-riscv = { git = "https://github.com/rustsbi/xuantie", rev = "fe7ec712" }
16-
# FIXME: remove this dependency once `#![feature(naked_functions)]` is stablized
17-
naked-function = "0.1.5"
1816

1917
[dev-dependencies]
2018

bouffalo-rt/src/soc/bl616.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use crate::{HalBasicConfig, HalFlashConfig, HalPatchCfg};
44

55
#[cfg(all(feature = "bl616", target_arch = "riscv32"))]
6-
#[naked_function::naked]
6+
#[unsafe(naked)]
77
#[link_section = ".text.entry"]
88
#[export_name = "_start"]
99
unsafe extern "C" fn start() -> ! {

bouffalo-rt/src/soc/bl702.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use core::arch::naked_asm;
1414
const LEN_STACK: usize = 1 * 1024;
1515

1616
#[cfg(feature = "bl702")]
17-
#[naked_function::naked]
17+
#[unsafe(naked)]
1818
#[unsafe(link_section = ".text.entry")]
1919
#[unsafe(export_name = "_start")]
2020
unsafe extern "C" fn start() -> ! {

0 commit comments

Comments
 (0)