Skip to content

Commit f00a398

Browse files
committed
remove asm feature
The `asm!()` macro was stabilized in rust-lang/rust#91728. This removes the feature and imports it through `core::arch` instead.
1 parent 2ab8d33 commit f00a398

File tree

28 files changed

+42
-17
lines changed

28 files changed

+42
-17
lines changed

arch/cortex-m/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
33
#![crate_name = "cortexm"]
44
#![crate_type = "rlib"]
5-
#![feature(asm, asm_sym)]
5+
#![feature(asm_sym)]
66
#![feature(naked_functions)]
77
#![no_std]
88

9+
use core::arch::asm;
910
use core::fmt::Write;
1011

1112
pub mod mpu;

arch/cortex-m/src/scb.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
//!
33
//! <http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0553a/CIHFDJCA.html>
44
5+
use core::arch::asm;
6+
57
use kernel::utilities::registers::interfaces::{ReadWriteable, Readable, Writeable};
68
use kernel::utilities::registers::{register_bitfields, register_structs, ReadOnly, ReadWrite};
79
use kernel::utilities::StaticRef;

arch/cortex-m/src/support.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use core::arch::asm;
12
use core::ops::FnOnce;
23

34
#[cfg(all(target_arch = "arm", target_os = "none"))]

arch/cortex-m0/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
#![crate_name = "cortexm0"]
44
#![crate_type = "rlib"]
5-
#![feature(asm, asm_sym, naked_functions)]
5+
#![feature(asm_sym, naked_functions)]
66
#![no_std]
77

88
// Re-export the base generic cortex-m functions here as they are
@@ -13,6 +13,8 @@ pub use cortexm::nvic;
1313
pub use cortexm::print_cortexm_state as print_cortexm0_state;
1414
pub use cortexm::syscall;
1515

16+
use core::arch::asm;
17+
1618
extern "C" {
1719
// _estack is not really a function, but it makes the types work
1820
// You should never actually invoke it!!

arch/cortex-m0p/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
33
#![crate_name = "cortexm0p"]
44
#![crate_type = "rlib"]
5-
#![feature(asm)]
65
#![feature(naked_functions)]
76
#![no_std]
87

@@ -26,6 +25,8 @@ pub use cortexm0::generic_isr;
2625
pub use cortexm0::hard_fault_handler;
2726
pub use cortexm0::systick_handler;
2827

28+
use core::arch::asm;
29+
2930
// Mock implementation for tests on Travis-CI.
3031
#[cfg(not(any(target_arch = "arm", target_os = "none")))]
3132
pub unsafe extern "C" fn switch_to_user(

arch/rv32i/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
33
#![crate_name = "rv32i"]
44
#![crate_type = "rlib"]
5-
#![feature(asm, asm_sym, const_fn_trait_bound, naked_functions)]
5+
#![feature(asm_sym, const_fn_trait_bound, naked_functions)]
66
#![no_std]
77

8+
use core::arch::asm;
89
use core::fmt::Write;
910

1011
use kernel::utilities::registers::interfaces::{Readable, Writeable};

arch/rv32i/src/support.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//! Core low-level operations.
22
33
use crate::csr::{mstatus::mstatus, CSR};
4+
use core::arch::asm;
45
use core::ops::FnOnce;
56

67
#[cfg(all(target_arch = "riscv32", target_os = "none"))]

arch/rv32i/src/syscall.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//! Kernel-userland system call interface for RISC-V architecture.
22
3+
use core::arch::asm;
34
use core::convert::TryInto;
45
use core::fmt::Write;
56
use core::mem::size_of;

boards/nano_rp2040_connect/src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
// https://github.com/rust-lang/rust/issues/62184.
88
#![cfg_attr(not(doc), no_main)]
99
#![deny(missing_docs)]
10-
#![feature(asm, naked_functions)]
10+
#![feature(naked_functions)]
11+
12+
use core::arch::asm;
1113

1214
use capsules::virtual_alarm::VirtualMuxAlarm;
1315
use components::gpio::GpioComponent;

boards/pico_explorer_base/src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
// https://github.com/rust-lang/rust/issues/62184.
88
#![cfg_attr(not(doc), no_main)]
99
#![deny(missing_docs)]
10-
#![feature(asm, naked_functions)]
10+
#![feature(naked_functions)]
11+
12+
use core::arch::asm;
1113

1214
use kernel::dynamic_deferred_call::{DynamicDeferredCall, DynamicDeferredCallClientState};
1315

0 commit comments

Comments
 (0)