File tree Expand file tree Collapse file tree 10 files changed +24
-0
lines changed Expand file tree Collapse file tree 10 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 1
1
//! Enabling and disabling interrupts
2
2
3
+ #[ cfg( feature = "inline_asm" ) ]
4
+ use core:: arch:: asm;
5
+
3
6
/// Returns whether interrupts are enabled.
4
7
#[ inline]
5
8
pub fn are_enabled ( ) -> bool {
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ pub mod segmentation;
9
9
pub mod tables;
10
10
pub mod tlb;
11
11
12
+ #[ cfg( feature = "inline_asm" ) ]
13
+ use core:: arch:: asm;
14
+
12
15
/// Halts the CPU until the next interrupt arrives.
13
16
#[ inline]
14
17
pub fn hlt ( ) {
Original file line number Diff line number Diff line change 1
1
//! Access to I/O ports
2
2
3
+ #[ cfg( feature = "inline_asm" ) ]
4
+ use core:: arch:: asm;
3
5
use core:: fmt;
4
6
use core:: marker:: PhantomData ;
5
7
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ use crate::{
6
6
structures:: gdt:: SegmentSelector ,
7
7
VirtAddr ,
8
8
} ;
9
+ #[ cfg( feature = "inline_asm" ) ]
10
+ use core:: arch:: asm;
9
11
10
12
macro_rules! get_reg_impl {
11
13
( $name: literal, $asm_get: ident) => {
Original file line number Diff line number Diff line change 2
2
3
3
use crate :: structures:: gdt:: SegmentSelector ;
4
4
use crate :: VirtAddr ;
5
+ #[ cfg( feature = "inline_asm" ) ]
6
+ use core:: arch:: asm;
5
7
6
8
pub use crate :: structures:: DescriptorTablePointer ;
7
9
Original file line number Diff line number Diff line change 1
1
//! Functions to flush the translation lookaside buffer (TLB).
2
2
3
3
use crate :: VirtAddr ;
4
+ #[ cfg( feature = "inline_asm" ) ]
5
+ use core:: arch:: asm;
4
6
5
7
/// Invalidate the given address in the TLB using the `invlpg` instruction.
6
8
#[ inline]
Original file line number Diff line number Diff line change 2
2
3
3
pub use super :: model_specific:: { Efer , EferFlags } ;
4
4
use bitflags:: bitflags;
5
+ #[ cfg( feature = "inline_asm" ) ]
6
+ use core:: arch:: asm;
5
7
6
8
/// Various control flags modifying the basic operation of the CPU.
7
9
#[ derive( Debug ) ]
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ use bitflags::bitflags;
4
4
// imports for intra doc links
5
5
#[ cfg( doc) ]
6
6
use crate :: registers:: segmentation:: { FS , GS } ;
7
+ #[ cfg( feature = "inline_asm" ) ]
8
+ use core:: arch:: asm;
7
9
8
10
/// A model specific register.
9
11
#[ derive( Debug ) ]
Original file line number Diff line number Diff line change 3
3
#[ cfg( feature = "instructions" ) ]
4
4
pub use self :: x86_64:: * ;
5
5
6
+ #[ cfg( feature = "inline_asm" ) ]
7
+ use core:: arch:: asm;
8
+
6
9
use bitflags:: bitflags;
7
10
8
11
bitflags ! {
Original file line number Diff line number Diff line change 1
1
//! Access to various extended system registers
2
2
use bitflags:: bitflags;
3
3
4
+ #[ cfg( feature = "inline_asm" ) ]
5
+ use core:: arch:: asm;
6
+
4
7
/// Extended feature enable mask register
5
8
#[ derive( Debug ) ]
6
9
pub struct XCr0 ;
You can’t perform that action at this time.
0 commit comments