aboutsummaryrefslogtreecommitdiff
path: root/src/dtables.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/dtables.rs')
-rw-r--r--src/dtables.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dtables.rs b/src/dtables.rs
index a47d344..1aff96b 100644
--- a/src/dtables.rs
+++ b/src/dtables.rs
@@ -1,4 +1,4 @@
-/// Functions and data-structures to load descriptor tables.
+//! Functions and data-structures to load descriptor tables.
/// A struct describing a pointer to a descriptor table (GDT / IDT).
/// This is in a format suitable for giving to 'lgdt' or 'lidt'.
@@ -13,15 +13,15 @@ pub struct DescriptorTablePointer {
/// Load GDT table.
pub unsafe fn lgdt(gdt: &DescriptorTablePointer) {
- asm!("lgdt ($0)" :: "r" (gdt));
+ asm!("lgdt ($0)" :: "r" (gdt) : "memory");
}
/// Load LDT table.
pub unsafe fn lldt(ldt: &DescriptorTablePointer) {
- asm!("lldt ($0)" :: "r" (ldt));
+ asm!("lldt ($0)" :: "r" (ldt) : "memory");
}
/// Load IDT table.
pub unsafe fn lidt(idt: &DescriptorTablePointer) {
- asm!("lidt ($0)" :: "r" (idt));
+ asm!("lidt ($0)" :: "r" (idt) : "memory");
} \ No newline at end of file