Subversion Repositories HelenOS-historic

Rev

Rev 84 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 84 Rev 90
Line 49... Line 49...
49
}
49
}
50
 
50
 
51
 
51
 
52
void fpu_lazy_context_save(fpu_context_t *fctx)
52
void fpu_lazy_context_save(fpu_context_t *fctx)
53
{
53
{
54
    printf("");
-
 
55
    asm(
54
    asm
-
 
55
    (
-
 
56
        "push %%eax;"
56
        "mov %0,%%eax;"
57
        "mov 0x8(%%esp),%%eax;"
57
        "fxsave (%%eax);"
58
        "fnsave (%%eax);"
-
 
59
        "pop %%eax;"
58
    :"=m"(fctx)
60
        :"=m"(fctx)
59
    :
61
        :
60
    :"eax"
62
        :"eax"
61
    ); 
63
    ); 
62
    printf("");
-
 
63
}
64
}
64
 
65
 
65
void fpu_lazy_context_restore(fpu_context_t *fctx)
66
void fpu_lazy_context_restore(fpu_context_t *fctx)
66
{
67
{
67
    printf("");
-
 
68
    asm(
68
    asm
-
 
69
    (
-
 
70
        "push %%eax;"
69
        "mov %0,%%eax;"
71
        "mov 0x8(%%esp),%%eax;"
70
        "fxrstor (%%eax);"
72
        "frstor (%%eax);"
-
 
73
        "pop %%eax;"
71
    :"=m"(fctx)
74
        :"=m"(fctx)
72
    :
75
        :
73
    :"eax"
76
        :"eax"
74
    );
77
    );
75
    printf("");    
-
 
76
}
78
}
77
 
79
 
78
void fpu_init(void)
80
void fpu_init(void)
79
{
81
{
80
    asm(
82
    asm(