summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2010-04-16 01:09:23 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2010-04-16 01:09:23 +0200
commit7987a711e8f13c0543e87a0211981f4b40ef6d94 (patch)
tree8f559200c4fa28ddf3a948eb15cb5633cf0a07e4 /i386
parent538308b7794563fa87d28fd26aac45c83be78ddb (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.
Diffstat (limited to 'i386')
-rw-r--r--i386/i386/seg.h2
-rw-r--r--i386/i386/tss.h2
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_ */