Browse Source

fix(prototyper): use rustc_align attribute on function to align with upstream changeds.

Fix the toolchain to nightly-2025-08-01 to prevent the upstream update breaking rustsbi.

Signed-off-by: jackfiled <xcrenchangjun@outlook.com>
jackfiled 2 weeks ago
parent
commit
efe300d1f5
2 changed files with 3 additions and 3 deletions
  1. 2 2
      prototyper/prototyper/src/sbi/early_trap.rs
  2. 1 1
      rust-toolchain.toml

+ 2 - 2
prototyper/prototyper/src/sbi/early_trap.rs

@@ -8,7 +8,7 @@ use riscv::register::mtvec;
 /// This function will change a0 and a1 and will NOT change them back.
 // TODO: Support save trap info.
 #[unsafe(naked)]
-#[repr(align(16))]
+#[rustc_align(16)]
 pub(crate) unsafe extern "C" fn light_expected_trap() {
     naked_asm!(
         "add a0, zero, zero",
@@ -39,7 +39,7 @@ impl Default for TrapInfo {
 }
 
 #[unsafe(naked)]
-#[repr(align(16))]
+#[rustc_align(16)]
 pub(crate) unsafe extern "C" fn expected_trap() {
     naked_asm!(
         "csrr a4, mepc",

+ 1 - 1
rust-toolchain.toml

@@ -1,4 +1,4 @@
 [toolchain]
 profile = "minimal"
-channel = "nightly"
+channel = "nightly-2025-08-01"
 components = ["rustfmt", "clippy", "llvm-tools-preview", "rust-src"]