Skip to content

Commit 75890e8

Browse files
committed
Provide empty irq_enable/irq_disable asm stubs so the tests work.
1 parent 45dc402 commit 75890e8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

aarch32-cpu/src/asmv4.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ pub fn nop() {
88

99
/// Mask IRQ
1010
#[cfg_attr(not(feature = "check-asm"), inline)]
11-
#[instruction_set(arm::a32)]
11+
#[cfg_attr(target_arch = "arm", instruction_set(arm::a32))]
1212
pub fn irq_disable() {
13+
#[cfg(target_arch = "arm")]
1314
unsafe {
1415
core::arch::asm!(r#"
1516
mrs {0}, cpsr
@@ -28,8 +29,9 @@ pub fn irq_disable() {
2829

2930
/// Unmask IRQ
3031
#[cfg_attr(not(feature = "check-asm"), inline)]
31-
#[instruction_set(arm::a32)]
32+
#[cfg_attr(target_arch = "arm", instruction_set(arm::a32))]
3233
pub fn irq_enable() {
34+
#[cfg(target_arch = "arm")]
3335
unsafe {
3436
core::arch::asm!(r#"
3537
mrs {0}, cpsr
@@ -50,6 +52,7 @@ pub fn irq_enable() {
5052
///
5153
/// Return the bottom 24-bits of the MPIDR
5254
#[cfg_attr(not(feature = "check-asm"), inline)]
55+
#[cfg(target_arch = "arm")]
5356
#[instruction_set(arm::a32)]
5457
pub fn core_id() -> u32 {
5558
let r: u32;

0 commit comments

Comments
 (0)