Changeset 6de2480e in mainline for arch/ia32/src/fpu_context.c


Ignore:
Timestamp:
2005-05-19T11:55:15Z (20 years ago)
Author:
Jakub Vana <jakub.vana@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f3ebb64
Parents:
1eee8383
Message:

IA-32 FPU lazy context switching.
Doesn't work on Bochs and sometimes produces wrong results on P4.
Seems to work on VMware and PII.

Build script for IA-32 changed to build floppy images (image.bin) 1440K long.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/fpu_context.c

    r1eee8383 r6de2480e  
    5252void fpu_lazy_context_save(fpu_context_t *fctx)
    5353{
     54    printf("");
    5455    asm(
    5556        "mov %0,%%eax;"
    5657        "fxsave (%%eax);"
    57         "ret;"
    5858        :"=m"(fctx)
    5959        :
    60         :"%eax"
     60        :"eax"
    6161    ); 
     62    printf("");
    6263}
    6364
    6465void fpu_lazy_context_restore(fpu_context_t *fctx)
    6566{
     67    printf("");
    6668    asm(
    6769        "mov %0,%%eax;"
    6870        "fxrstor (%%eax);"
    69         "ret;"
    7071        :"=m"(fctx)
    7172        :
    72         :"%eax"
     73        :"eax"
    7374    );
     75    printf("");   
    7476}
    7577
Note: See TracChangeset for help on using the changeset viewer.