Subversion Repositories Kolibri OS

Rev

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

Rev 6079 Rev 7276
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;;
4
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa      ;;
4
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa      ;;
5
;; Distributed under terms of the GNU General Public License    ;;
5
;; Distributed under terms of the GNU General Public License    ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 6079 $
8
$Revision: 7276 $
9
 
9
 
10
 
10
 
Line 130... Line 130...
130
        mov     fs, dx
130
        mov     fs, dx
Line 131... Line 131...
131
 
131
 
132
; set gs selector unconditionally
132
; set gs selector unconditionally
133
        Mov     ax, graph_data
133
        Mov     ax, graph_data
-
 
134
        Mov     gs, ax
-
 
135
        ; TS flag is not triggered by AVX* instructions, therefore
-
 
136
        ; we have to xsave/xrstor SIMD registers each task change
-
 
137
        bt      [cpu_caps+(CAPS_OSXSAVE/32)*4], CAPS_OSXSAVE mod 32
-
 
138
        jnc     .no_xsave
-
 
139
        mov     ecx, [esi+APPDATA.fpu_state]
-
 
140
        mov     eax, [xsave_eax]
-
 
141
        mov     edx, [xsave_edx]
-
 
142
        xsave   [ecx]
-
 
143
        mov     ecx, [CURRENT_TASK]
-
 
144
        mov     [fpu_owner], ecx
-
 
145
        mov     ecx, [current_slot]
-
 
146
        mov     ecx, [ecx+APPDATA.fpu_state]
-
 
147
        xrstor  [ecx]
134
        Mov     gs, ax
148
  .no_xsave:
135
      ; set CR0.TS
149
      ; set CR0.TS
136
        cmp     bh, byte[fpu_owner] ;bh == incoming task (new)
150
        cmp     bh, byte[fpu_owner] ;bh == incoming task (new)
137
        clts                        ;clear a task switch flag
151
        clts                        ;clear a task switch flag
138
        je      @f
152
        je      @f