Add Russian translation provided by Валерий Крувялис <valkru@mail.ru>
[xiph-mirror.git] / vp32 / CoreLibs / CpuID / Win32 / VerifyXMMReg.asm
blob4ddb940325bea9d556162a5f17c463902e75270e
1 ;//==========================================================================
2 ;//
3 ;// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
4 ;// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
5 ;// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
6 ;// PURPOSE.
7 ;//
8 ;// Copyright (c) 1999 - 2001 On2 Technologies Inc. All Rights Reserved.
9 ;//
10 ;//--------------------------------------------------------------------------
13 INCLUDE iaxmm.inc
16 ; **-VerifyXMMReg
18 ; This function is meant to be run on a Windows NT system to
19 ; try and determine if the OS supports the XMM registers or
20 ; not.
22 ; This function is number 3 in a set of three. The other
23 ; functions are...
25 ; InitXMMReg
26 ; TrashXMMReg
28 ; Assumptions:
29 ; Assumes that InitXMMReg was called to initilize the XMM registers.
30 ; Assumes that TrashXMMReg was called from a different thread to clear
31 ; the values in the XMM registers.
33 ; Input:
34 ; None
36 ; Output:
37 ; Return 1 (True) if the XMM registers are at the correct values.
38 ; (os supports XMM registers)
40 ; Return 0 (False) if the XMM registers are not at the correct values.
41 ; (os does not support the XMM registers)
44 .586
45 .MODEL flat, SYSCALL, os_dos
46 .DATA
48 TORQ_CX_DATA SEGMENT PAGE PUBLIC USE32 'DATA'
50 ALIGN 32
53 NAME VerifyXMMReg
55 PUBLIC VerifyXMMReg_
56 PUBLIC _VerifyXMMReg
59 EXTERN XMM0Init:REAL4
60 EXTERN XMM1Init:REAL4
61 EXTERN XMM2Init:REAL4
64 .CODE
66 ; int VerifyXMMReg( void )
67 VerifyXMMReg_:
68 _VerifyXMMReg:
69 push esi ;safety sh*&
70 push edi
71 push ebp
72 push ebx
73 push ecx
74 push edx
76 mov eax,0 ; assume will fail
78 comiss xmm0,XMM0Init ; check XMM0
79 jne Exit
81 comiss xmm1,XMM1Init
82 jne Exit
84 comiss xmm2,XMM2Init
85 jne Exit
87 mov eax,1 ; OS supports XMM registers
89 Exit:
90 pop edx ;safety sh*&
91 pop ecx
92 pop ebx
93 pop ebp
94 pop edi
95 pop esi
96 ret
98 ;************************************************
99 END