Changeset af22f158 in mainline for arch/ia32/src


Ignore:
Timestamp:
2005-05-19T20:29:08Z (20 years ago)
Author:
Jakub Vana <jakub.vana@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c01bd280
Parents:
bc4a49f
Message:

Set TS flag on system startup.
Some bugs in FPU context switching seem to persist.
Optimalization on IA-32 disabled.

Location:
arch/ia32/src
Files:
3 edited

Legend:

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

    rbc4a49f raf22f158  
    132132                CPU->arch.stepping = (info.cpuid_eax>>0)&0xf;                                           
    133133        }
     134    set_TS_flag();
    134135}
    135136
  • arch/ia32/src/fpu_context.c

    rbc4a49f raf22f158  
    5252void fpu_lazy_context_save(fpu_context_t *fctx)
    5353{
    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        );     
    6364}
    6465
    6566void fpu_lazy_context_restore(fpu_context_t *fctx)
    6667{
    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        );
    7678}
    7779
  • arch/ia32/src/interrupt.c

    rbc4a49f raf22f158  
    102102        if ((CPU->fpu_owner)!=NULL)
    103103        { 
    104 //              printf("owner %X\n",(int)(&((CPU->fpu_owner)->saved_fpu_context)));       
     104//              printf("tid:%d \n", THREAD->tid);
     105//              printf("owner:%d\n", (CPU->fpu_owner)->tid);
    105106                fpu_lazy_context_save(&((CPU->fpu_owner)->saved_fpu_context));
    106107
Note: See TracChangeset for help on using the changeset viewer.