include/SDL_cpuinfo.h
author Sam Lantinga <slouken@libsdl.org>
Thu, 09 Feb 2006 09:07:13 +0000
changeset 1353 7ba544e2888d
parent 1312 c9b51268668f
child 1356 67114343400d
permissions -rw-r--r--
Started the process of improving configure support, and merging C types
and library support into a single header.
slouken@739
     1
/*
slouken@739
     2
    SDL - Simple DirectMedia Layer
slouken@1312
     3
    Copyright (C) 1997-2006 Sam Lantinga
slouken@739
     4
slouken@739
     5
    This library is free software; you can redistribute it and/or
slouken@1312
     6
    modify it under the terms of the GNU Lesser General Public
slouken@739
     7
    License as published by the Free Software Foundation; either
slouken@1312
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@739
     9
slouken@739
    10
    This library is distributed in the hope that it will be useful,
slouken@739
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@739
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@1312
    13
    Lesser General Public License for more details.
slouken@739
    14
slouken@1312
    15
    You should have received a copy of the GNU Lesser General Public
slouken@1312
    16
    License along with this library; if not, write to the Free Software
slouken@1312
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@739
    18
slouken@739
    19
    Sam Lantinga
slouken@739
    20
    slouken@libsdl.org
slouken@739
    21
*/
slouken@739
    22
slouken@739
    23
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
slouken@739
    24
/* CPU feature detection for SDL                                       */
slouken@739
    25
slouken@1353
    26
#include "SDL_stdinc.h"
slouken@1353
    27
slouken@739
    28
#ifndef _SDL_cpuinfo_h
slouken@739
    29
#define _SDL_cpuinfo_h
slouken@739
    30
slouken@1353
    31
#ifndef DISABLE_CPUINFO
slouken@739
    32
#include "begin_code.h"
slouken@739
    33
/* Set up for C function definitions, even when using C++ */
slouken@739
    34
#ifdef __cplusplus
slouken@739
    35
extern "C" {
slouken@739
    36
#endif
slouken@739
    37
slouken@745
    38
/* This function returns true if the CPU has the RDTSC instruction
slouken@745
    39
 */
slouken@745
    40
extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC();
slouken@745
    41
slouken@739
    42
/* This function returns true if the CPU has MMX features
slouken@739
    43
 */
slouken@739
    44
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX();
slouken@739
    45
slouken@785
    46
/* This function returns true if the CPU has MMX Ext. features
slouken@785
    47
 */
slouken@785
    48
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMXExt();
slouken@785
    49
slouken@739
    50
/* This function returns true if the CPU has 3DNow features
slouken@739
    51
 */
slouken@739
    52
extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow();
slouken@739
    53
slouken@785
    54
/* This function returns true if the CPU has 3DNow! Ext. features
slouken@785
    55
 */
slouken@785
    56
extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNowExt();
slouken@785
    57
slouken@739
    58
/* This function returns true if the CPU has SSE features
slouken@739
    59
 */
slouken@739
    60
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE();
slouken@739
    61
slouken@785
    62
/* This function returns true if the CPU has SSE2 features
slouken@785
    63
 */
slouken@785
    64
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2();
slouken@785
    65
slouken@778
    66
/* This function returns true if the CPU has AltiVec features
slouken@778
    67
 */
slouken@778
    68
extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec();
slouken@778
    69
slouken@739
    70
/* Ends C function definitions when using C++ */
slouken@739
    71
#ifdef __cplusplus
slouken@739
    72
}
slouken@739
    73
#endif
slouken@739
    74
#include "close_code.h"
slouken@1353
    75
#endif /* !DISABLE_CPUINFO */
slouken@739
    76
slouken@739
    77
#endif /* _SDL_cpuinfo_h */