Changeset 0a306cee0a5040ccbe9073a129753b7945911826
- Timestamp:
- 02/02/04 00:02:02
(5 years ago)
- Author:
- Sigmund Augdal Helberg <sigmunau@videolan.org>
- git-committer:
- Sigmund Augdal Helberg <sigmunau@videolan.org> 1075676522 +0000
- git-parent:
[675864e25602627b2128e1ff0d8570a1b668da87]
- git-author:
- Sigmund Augdal Helberg <sigmunau@videolan.org> 1075676522 +0000
- Message:
src/misc/cpu.c:
- SSE2 detection, using a similar approch as for SSE
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r0a7d84f |
r0a306ce |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 1998-2004 VideoLAN |
|---|
| 5 | | * $Id: cpu.c,v 1.13 2004/01/20 15:34:44 hartman Exp $ |
|---|
| | 5 | * $Id: cpu.c,v 1.14 2004/02/01 23:02:02 sigmunau Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Samuel Hocevar <sam@zoy.org> |
|---|
| … | … | |
| 186 | 186 | # endif |
|---|
| 187 | 187 | } |
|---|
| | 188 | if( i_edx & 0x04000000 ) |
|---|
| | 189 | { |
|---|
| | 190 | # ifdef CAN_COMPILE_SSE |
|---|
| | 191 | /* We test if OS supports the SSE instructions */ |
|---|
| | 192 | psz_capability = "SSE2"; |
|---|
| | 193 | i_illegal = 0; |
|---|
| | 194 | |
|---|
| | 195 | if( setjmp( env ) == 0 ) |
|---|
| | 196 | { |
|---|
| | 197 | /* Test a SSE2 instruction */ |
|---|
| | 198 | __asm__ __volatile__ ( "movupd %%xmm0, %%xmm0\n" : : ); |
|---|
| | 199 | } |
|---|
| | 200 | |
|---|
| | 201 | if( i_illegal == 0 ) |
|---|
| | 202 | { |
|---|
| | 203 | i_capabilities |= CPU_CAPABILITY_SSE2; |
|---|
| | 204 | } |
|---|
| | 205 | # endif |
|---|
| | 206 | } |
|---|
| 188 | 207 | |
|---|
| 189 | 208 | /* test for additional capabilities */ |
|---|