Skip to content

Commit 32d5fdc

Browse files
committed
fix: don't use #[naked] when inlining is paramount for correctness
Functions with `#[naked]` are no longer eligible for inlining as of <rust-lang/rust#79192>. Fixes test failures in the RISC-V port.
1 parent 72bb293 commit 32d5fdc

File tree

3 files changed

+0
-3
lines changed

3 files changed

+0
-3
lines changed

src/r3_port_arm/src/startup/imp.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ impl VectorTable {
3030
}
3131
}
3232

33-
#[naked]
3433
#[inline(always)]
3534
pub fn start<System: EntryPoint + StartupOptions>() {
3635
unsafe {

src/r3_port_riscv/src/threading/cfg.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ macro_rules! use_port {
6161
unsafe { PORT_STATE.port_boot::<Self>() };
6262
}
6363

64-
#[naked]
6564
#[inline(always)]
6665
unsafe fn exception_handler() -> ! {
6766
unsafe { State::exception_handler::<Self>() };

src/r3_port_riscv/src/threading/imp.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,6 @@ impl State {
11131113
}
11141114

11151115
/// Implements [`crate::EntryPoint::exception_handler`].
1116-
#[naked]
11171116
#[inline(always)]
11181117
pub unsafe fn exception_handler<System: PortInstance>() -> ! {
11191118
const FRAME_SIZE: usize = if cfg!(target_feature = "f") {

0 commit comments

Comments
 (0)