commit 0314dcdbf19d535f116c7c84ba78dddfbc79f6b9
parent 39352fa0eae25b4d851e9d889c1f88916f32e1ff
Author: Brian Swetland <swetland@frotz.net>
Date: Tue, 31 Dec 2013 11:08:05 -0800
include/x86.h - use assembly forms that compile correctly in both 32 and 64bit
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/x86.h b/include/x86.h
@@ -93,7 +93,7 @@ static inline uintp
readeflags(void)
{
uintp eflags;
- asm volatile("pushfl; popl %0" : "=r" (eflags));
+ asm volatile("pushf; pop %0" : "=r" (eflags));
return eflags;
}
@@ -138,14 +138,14 @@ static inline uintp
rcr2(void)
{
uintp val;
- asm volatile("movl %%cr2,%0" : "=r" (val));
+ asm volatile("mov %%cr2,%0" : "=r" (val));
return val;
}
static inline void
lcr3(uintp val)
{
- asm volatile("movl %0,%%cr3" : : "r" (val));
+ asm volatile("mov %0,%%cr3" : : "r" (val));
}
//PAGEBREAK: 36