Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
70 | giacomo | 1 | /* $Id: common_x86.c,v 1.1 2003-03-13 12:11:48 giacomo Exp $ */ |
2 | |||
3 | /* |
||
4 | * Mesa 3-D graphics library |
||
5 | * Version: 5.0 |
||
6 | * |
||
7 | * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. |
||
8 | * |
||
9 | * Permission is hereby granted, free of charge, to any person obtaining a |
||
10 | * copy of this software and associated documentation files (the "Software"), |
||
11 | * to deal in the Software without restriction, including without limitation |
||
12 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||
13 | * and/or sell copies of the Software, and to permit persons to whom the |
||
14 | * Software is furnished to do so, subject to the following conditions: |
||
15 | * |
||
16 | * The above copyright notice and this permission notice shall be included |
||
17 | * in all copies or substantial portions of the Software. |
||
18 | * |
||
19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
||
20 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||
21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||
22 | * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN |
||
23 | * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
||
24 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
||
25 | */ |
||
26 | |||
27 | /* |
||
28 | * Check CPU capabilities & initialize optimized funtions for this particular |
||
29 | * processor. |
||
30 | * |
||
31 | * Written by Holger Waechtler <holger@akaflieg.extern.tu-berlin.de> |
||
32 | * Changed by Andre Werthmann <wertmann@cs.uni-potsdam.de> for using the |
||
33 | * new Katmai functions. |
||
34 | */ |
||
35 | |||
36 | #include <stdlib.h> |
||
37 | #include <stdio.h> |
||
38 | #if defined(USE_SSE_ASM) && defined(__linux__) |
||
39 | #include <signal.h> |
||
40 | #endif |
||
41 | #if defined(USE_SSE_ASM) && defined(__FreeBSD__) |
||
42 | #include <sys/types.h> |
||
43 | #include <sys/sysctl.h> |
||
44 | #endif |
||
45 | |||
46 | #include "context.h" |
||
47 | #include "common_x86_asm.h" |
||
48 | #include "imports.h" |
||
49 | |||
50 | |||
51 | int _mesa_x86_cpu_features = 1; |
||
52 | |||
53 | void _mesa_init_all_x86_transform_asm( void ) |
||
54 | { |
||
55 | |||
56 | _mesa_x86_cpu_features = 1; |
||
57 | |||
58 | if ( _mesa_x86_cpu_features ) { |
||
59 | _mesa_init_x86_transform_asm(); |
||
60 | } |
||
61 | |||
62 | _mesa_x86_cpu_features &= ~(X86_FEATURE_XMM); |
||
63 | |||
64 | } |
||
65 |