diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2011-08-31 01:49:30 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2011-08-31 01:49:30 +0200 |
commit | 317e678d6d0bff1be16383a6ef9d914f28aebb74 (patch) | |
tree | 96d81a93494aa328404d3c028a965f806148fa2a /i386 | |
parent | b0b830433d9afbd8c5a7562ac5cebd6db2eacaa6 (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.h | 2 |
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 */ |