Subversion Repositories Kolibri OS

Rev

Rev 221 | Rev 378 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 221 Rev 357
Line 4... Line 4...
4
 
4
 
Line 5... Line 5...
5
           bt [cpu_caps], CAPS_SSE
5
           bt [cpu_caps], CAPS_SSE
6
           jnc .no_SSE
6
           jnc .no_SSE
Line 7... Line -...
7
 
-
 
8
           stdcall kernel_alloc, 512*256
-
 
9
           mov [fpu_data], eax
-
 
10
 
7
 
11
           mov ebx, cr4
8
           mov ebx, cr4
12
           mov ecx, cr0
9
           mov ecx, cr0
13
           or ebx, CR4_OSFXSR+CR4_OSXMMEXPT
10
           or ebx, CR4_OSFXSR+CR4_OSXMMEXPT
Line 27... Line 24...
27
           xorps xmm4, xmm4
24
           xorps xmm4, xmm4
28
           xorps xmm5, xmm5
25
           xorps xmm5, xmm5
29
           xorps xmm6, xmm6
26
           xorps xmm6, xmm6
30
           xorps xmm7, xmm7
27
           xorps xmm7, xmm7
31
           fxsave [eax]
28
           fxsave [fpu_data]  ;[eax]
32
           ret
29
           ret
33
.no_SSE:
30
.no_SSE:
34
           stdcall kernel_alloc, 112*256
31
           mov ecx, cr0
35
           mov [fpu_data], eax
-
 
36
           mov ecx, cr0
-
 
37
           and ecx, not CR0_EM
32
           and ecx, not CR0_EM
38
           or ecx, CR0_MP+CR0_NE
33
           or ecx, CR0_MP+CR0_NE
39
           mov cr0, ecx
34
           mov cr0, ecx
40
           fnsave [eax]
35
           fnsave [fpu_data]
41
           ret
36
           ret
42
 
37
 
Line 43... Line 38...
43
align 4
38
align 4
44
proc fpu_save
39
proc fpu_save
45
           clts
40
           clts
Line 116... Line 111...
116
iglobal
111
iglobal
117
  fpu_owner dd 1
112
  fpu_owner dd 1
118
 endg
113
 endg
Line 119... Line -...
119
 
-
 
120
 
-
 
121
 
114
 
122
reg_eip       equ ebp+4
115
reg_eip       equ ebp+4
123
reg_cs        equ ebp+8
116
reg_cs        equ ebp+8
124
reg_eflags    equ ebp+12
117
reg_eflags    equ ebp+12
125
reg_esp       equ ebp+16
118
reg_esp       equ ebp+16