fix FPU after r7124 for other CPU configurations

git-svn-id: svn://kolibrios.org@7165 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
CleverMouse 2018-02-19 16:35:45 +00:00
parent a49931c083
commit 43e84d7672
4 changed files with 12 additions and 4 deletions

View File

@ -34,15 +34,19 @@ init_fpu:
xor ecx, ecx
cpuid
mov [xsave_area_size], ebx
cmp ebx, fpu_data_size
ja $
test eax, XCR0_AVX512
jz @f
call init_avx512
xsave [fpu_data]
ret
@@:
test eax, XCR0_AVX
jz @f
call init_avx
xsave [fpu_data]
ret
@@:
test eax, XCR0_SSE

View File

@ -924,7 +924,9 @@ proc set_app_params stdcall,slot:dword, params:dword, flags:dword
mov [eax+SLOT_BASE+APPDATA.io_map+4], ecx
mov esi, fpu_data
mov ecx, 512/4
mov ecx, [xsave_area_size]
add ecx, 3
shr ecx, 2
rep movsd
cmp ebx, [TASK_COUNT]

View File

@ -336,7 +336,8 @@ align 16
cur_saved_data:
rb 4096
fpu_data:
rb 512
rb 1024
fpu_data_size = $ - fpu_data
draw_data:
rb 32*256
BPSLine_calc_area rd 1440

View File

@ -1116,8 +1116,9 @@ proc setup_os_slot
mov dword [edx+APPDATA.terminate_protection], 1 ; make unkillable
mov esi, fpu_data
mov ecx, 512/4
cld
mov ecx, [xsave_area_size]
add ecx, 3
shr ecx, 2
rep movsd
lea eax, [edx+APP_OBJ_OFFSET]