Changeset af22f158 in mainline for arch/ia32/src/fpu_context.c
- Timestamp:
- 2005-05-19T20:29:08Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c01bd280
- Parents:
- bc4a49f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/src/fpu_context.c
rbc4a49f raf22f158 52 52 void fpu_lazy_context_save(fpu_context_t *fctx) 53 53 { 54 printf(""); 55 asm( 56 "mov %0,%%eax;" 57 "fxsave (%%eax);" 58 :"=m"(fctx) 59 : 60 :"eax" 61 ); 62 printf(""); 54 asm 55 ( 56 "push %%eax;" 57 "mov 0x8(%%esp),%%eax;" 58 "fnsave (%%eax);" 59 "pop %%eax;" 60 :"=m"(fctx) 61 : 62 :"eax" 63 ); 63 64 } 64 65 65 66 void fpu_lazy_context_restore(fpu_context_t *fctx) 66 67 { 67 printf(""); 68 asm( 69 "mov %0,%%eax;" 70 "fxrstor (%%eax);" 71 :"=m"(fctx) 72 : 73 :"eax" 74 ); 75 printf(""); 68 asm 69 ( 70 "push %%eax;" 71 "mov 0x8(%%esp),%%eax;" 72 "frstor (%%eax);" 73 "pop %%eax;" 74 :"=m"(fctx) 75 : 76 :"eax" 77 ); 76 78 } 77 79
Note:
See TracChangeset
for help on using the changeset viewer.