/SPARTAN/trunk/arch/ia32/src/fpu_context.c |
---|
49,30 → 49,20 |
void fpu_lazy_context_save(fpu_context_t *fctx) |
{ |
asm |
( |
"push %%eax;" |
"mov 0x8(%%esp),%%eax;" |
"fnsave (%%eax);" |
"pop %%eax;" |
:"=m"(fctx) |
: |
:"eax" |
); |
return; |
__asm__ ( |
"fnsave %0" |
: "=m"(fctx) |
); |
} |
void fpu_lazy_context_restore(fpu_context_t *fctx) |
{ |
asm |
( |
"push %%eax;" |
"mov 0x8(%%esp),%%eax;" |
"frstor (%%eax);" |
"pop %%eax;" |
:"=m"(fctx) |
: |
:"eax" |
); |
return; |
__asm__ ( |
"frstor %0" |
: "=m"(fctx) |
); |
} |
void fpu_init(void) |