diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-04-16 01:09:23 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-04-16 01:09:23 +0200 |
commit | 7987a711e8f13c0543e87a0211981f4b40ef6d94 (patch) | |
tree | 8f559200c4fa28ddf3a948eb15cb5633cf0a07e4 | |
parent | 538308b7794563fa87d28fd26aac45c83be78ddb (diff) |
Add memory clobbers to segment selector loaders
* i386/i386/seg.h (lldt): Add memory clobber to lldt asm
snippet.
* i386/i386/tss.h (ltr): Add memory clobber to ltr asm
snippet.
-rw-r--r-- | i386/i386/seg.h | 2 | ||||
-rw-r--r-- | i386/i386/tss.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/i386/i386/seg.h b/i386/i386/seg.h index 7f12cc0..a7f6573 100644 --- a/i386/i386/seg.h +++ b/i386/i386/seg.h @@ -146,7 +146,7 @@ MACH_INLINE void lidt(struct pseudo_descriptor *pdesc) } MACH_INLINE void lldt(unsigned short ldt_selector) { - __asm volatile("lldt %w0" : : "r" (ldt_selector)); + __asm volatile("lldt %w0" : : "r" (ldt_selector) : "memory"); } #ifdef CODE16 diff --git a/i386/i386/tss.h b/i386/i386/tss.h index ee0d612..ff25f21 100644 --- a/i386/i386/tss.h +++ b/i386/i386/tss.h @@ -83,7 +83,7 @@ struct task_tss MACH_INLINE void ltr(unsigned short segment) { - __asm volatile("ltr %0" : : "r" (segment)); + __asm volatile("ltr %0" : : "r" (segment) : "memory"); } #endif /* _I386_TSS_H_ */ |