typedef struct
{
- reg16 ss;
- reg16 es;
reg16 ds;
+ reg16 es;
reg16 fs;
reg16 gs;
- reg16 cs;
} __attribute__((packed)) sg_reg;
void
cpu_rcr0()
{
uintptr_t val;
- asm volatile("movl %%cr0,%0" : "=r" (val));
+ asm volatile("movl %%cr0,%0" : "=r"(val));
return val;
}
cpu_rcr2()
{
uintptr_t val;
- asm volatile("movl %%cr2,%0" : "=r" (val));
+ asm volatile("movl %%cr2,%0" : "=r"(val));
return val;
}
cpu_rcr3()
{
uintptr_t val;
- asm volatile("movl %%cr3,%0" : "=r" (val));
+ asm volatile("movl %%cr3,%0" : "=r"(val));
return val;
}
cpu_reflags()
{
uintptr_t val;
- asm volatile(
- "pushf\n"
- "popl %0\n"
- :"=r"(val)::);
+ asm volatile("pushf\n"
+ "popl %0\n"
+ : "=r"(val)::);
return val;
}
#pragma GCC diagnostic pop