summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2011-08-31 01:49:30 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-08-31 01:49:30 +0200
commit317e678d6d0bff1be16383a6ef9d914f28aebb74 (patch)
tree96d81a93494aa328404d3c028a965f806148fa2a /i386
parentb0b830433d9afbd8c5a7562ac5cebd6db2eacaa6 (diff)
Protect set_cr3 against compiler assignment optimizations
This fixes the kdb `break' command. i386/i386/proc_reg.h (set_cr3): Add "memory" clobber.
Diffstat (limited to 'i386')
-rw-r--r--i386/i386/proc_reg.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/i386/i386/proc_reg.h b/i386/i386/proc_reg.h
index 64d8c43..84e9931 100644
--- a/i386/i386/proc_reg.h
+++ b/i386/i386/proc_reg.h
@@ -144,7 +144,7 @@ extern unsigned long cr3;
#define set_cr3(value) \
({ \
register unsigned int _temp__ = (value); \
- asm volatile("mov %0, %%cr3" : : "r" (_temp__)); \
+ asm volatile("mov %0, %%cr3" : : "r" (_temp__) : "memory"); \
})
#endif /* MACH_HYP */