File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff 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) ) ]
1212pub 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) ) ]
3233pub 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) ]
5457pub fn core_id ( ) -> u32 {
5558 let r: u32 ;
You can’t perform that action at this time.
0 commit comments