Commit b25211fd authored by Sam Lantinga's avatar Sam Lantinga

*** empty log message ***

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401430
parent e0ad8e36
...@@ -36,35 +36,35 @@ extern "C" { ...@@ -36,35 +36,35 @@ extern "C" {
/* This function returns true if the CPU has the RDTSC instruction /* This function returns true if the CPU has the RDTSC instruction
*/ */
extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(); extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
/* This function returns true if the CPU has MMX features /* This function returns true if the CPU has MMX features
*/ */
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(); extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
/* This function returns true if the CPU has MMX Ext. features /* This function returns true if the CPU has MMX Ext. features
*/ */
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMXExt(); extern DECLSPEC SDL_bool SDLCALL SDL_HasMMXExt(void);
/* This function returns true if the CPU has 3DNow features /* This function returns true if the CPU has 3DNow features
*/ */
extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(); extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
/* This function returns true if the CPU has 3DNow! Ext. features /* This function returns true if the CPU has 3DNow! Ext. features
*/ */
extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNowExt(); extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNowExt(void);
/* This function returns true if the CPU has SSE features /* This function returns true if the CPU has SSE features
*/ */
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(); extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
/* This function returns true if the CPU has SSE2 features /* This function returns true if the CPU has SSE2 features
*/ */
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(); extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
/* This function returns true if the CPU has AltiVec features /* This function returns true if the CPU has AltiVec features
*/ */
extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(); extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
/* Ends C function definitions when using C++ */ /* Ends C function definitions when using C++ */
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -55,7 +55,7 @@ static void illegal_instruction(int sig) ...@@ -55,7 +55,7 @@ static void illegal_instruction(int sig)
} }
#endif /* HAVE_SETJMP */ #endif /* HAVE_SETJMP */
static __inline__ int CPU_haveCPUID() static __inline__ int CPU_haveCPUID(void)
{ {
int has_CPUID = 0; int has_CPUID = 0;
#if defined(__GNUC__) && defined(i386) #if defined(__GNUC__) && defined(i386)
...@@ -145,7 +145,7 @@ done: ...@@ -145,7 +145,7 @@ done:
return has_CPUID; return has_CPUID;
} }
static __inline__ int CPU_getCPUIDFeatures() static __inline__ int CPU_getCPUIDFeatures(void)
{ {
int features = 0; int features = 0;
#if defined(__GNUC__) && ( defined(i386) || defined(__x86_64__) ) #if defined(__GNUC__) && ( defined(i386) || defined(__x86_64__) )
...@@ -198,7 +198,7 @@ done: ...@@ -198,7 +198,7 @@ done:
return features; return features;
} }
static __inline__ int CPU_getCPUIDFeaturesExt() static __inline__ int CPU_getCPUIDFeaturesExt(void)
{ {
int features = 0; int features = 0;
#if defined(__GNUC__) && (defined(i386) || defined (__x86_64__) ) #if defined(__GNUC__) && (defined(i386) || defined (__x86_64__) )
...@@ -249,7 +249,7 @@ done: ...@@ -249,7 +249,7 @@ done:
return features; return features;
} }
static __inline__ int CPU_haveRDTSC() static __inline__ int CPU_haveRDTSC(void)
{ {
if ( CPU_haveCPUID() ) { if ( CPU_haveCPUID() ) {
return (CPU_getCPUIDFeatures() & 0x00000010); return (CPU_getCPUIDFeatures() & 0x00000010);
...@@ -257,7 +257,7 @@ static __inline__ int CPU_haveRDTSC() ...@@ -257,7 +257,7 @@ static __inline__ int CPU_haveRDTSC()
return 0; return 0;
} }
static __inline__ int CPU_haveMMX() static __inline__ int CPU_haveMMX(void)
{ {
if ( CPU_haveCPUID() ) { if ( CPU_haveCPUID() ) {
return (CPU_getCPUIDFeatures() & 0x00800000); return (CPU_getCPUIDFeatures() & 0x00800000);
...@@ -265,7 +265,7 @@ static __inline__ int CPU_haveMMX() ...@@ -265,7 +265,7 @@ static __inline__ int CPU_haveMMX()
return 0; return 0;
} }
static __inline__ int CPU_haveMMXExt() static __inline__ int CPU_haveMMXExt(void)
{ {
if ( CPU_haveCPUID() ) { if ( CPU_haveCPUID() ) {
return (CPU_getCPUIDFeaturesExt() & 0x00400000); return (CPU_getCPUIDFeaturesExt() & 0x00400000);
...@@ -273,7 +273,7 @@ static __inline__ int CPU_haveMMXExt() ...@@ -273,7 +273,7 @@ static __inline__ int CPU_haveMMXExt()
return 0; return 0;
} }
static __inline__ int CPU_have3DNow() static __inline__ int CPU_have3DNow(void)
{ {
if ( CPU_haveCPUID() ) { if ( CPU_haveCPUID() ) {
return (CPU_getCPUIDFeaturesExt() & 0x80000000); return (CPU_getCPUIDFeaturesExt() & 0x80000000);
...@@ -281,7 +281,7 @@ static __inline__ int CPU_have3DNow() ...@@ -281,7 +281,7 @@ static __inline__ int CPU_have3DNow()
return 0; return 0;
} }
static __inline__ int CPU_have3DNowExt() static __inline__ int CPU_have3DNowExt(void)
{ {
if ( CPU_haveCPUID() ) { if ( CPU_haveCPUID() ) {
return (CPU_getCPUIDFeaturesExt() & 0x40000000); return (CPU_getCPUIDFeaturesExt() & 0x40000000);
...@@ -289,7 +289,7 @@ static __inline__ int CPU_have3DNowExt() ...@@ -289,7 +289,7 @@ static __inline__ int CPU_have3DNowExt()
return 0; return 0;
} }
static __inline__ int CPU_haveSSE() static __inline__ int CPU_haveSSE(void)
{ {
if ( CPU_haveCPUID() ) { if ( CPU_haveCPUID() ) {
return (CPU_getCPUIDFeatures() & 0x02000000); return (CPU_getCPUIDFeatures() & 0x02000000);
...@@ -297,7 +297,7 @@ static __inline__ int CPU_haveSSE() ...@@ -297,7 +297,7 @@ static __inline__ int CPU_haveSSE()
return 0; return 0;
} }
static __inline__ int CPU_haveSSE2() static __inline__ int CPU_haveSSE2(void)
{ {
if ( CPU_haveCPUID() ) { if ( CPU_haveCPUID() ) {
return (CPU_getCPUIDFeatures() & 0x04000000); return (CPU_getCPUIDFeatures() & 0x04000000);
...@@ -305,7 +305,7 @@ static __inline__ int CPU_haveSSE2() ...@@ -305,7 +305,7 @@ static __inline__ int CPU_haveSSE2()
return 0; return 0;
} }
static __inline__ int CPU_haveAltiVec() static __inline__ int CPU_haveAltiVec(void)
{ {
volatile int altivec = 0; volatile int altivec = 0;
#ifdef __MACOSX__ #ifdef __MACOSX__
...@@ -332,7 +332,7 @@ static __inline__ int CPU_haveAltiVec() ...@@ -332,7 +332,7 @@ static __inline__ int CPU_haveAltiVec()
static Uint32 SDL_CPUFeatures = 0xFFFFFFFF; static Uint32 SDL_CPUFeatures = 0xFFFFFFFF;
static Uint32 SDL_GetCPUFeatures() static Uint32 SDL_GetCPUFeatures(void)
{ {
if ( SDL_CPUFeatures == 0xFFFFFFFF ) { if ( SDL_CPUFeatures == 0xFFFFFFFF ) {
SDL_CPUFeatures = 0; SDL_CPUFeatures = 0;
...@@ -364,7 +364,7 @@ static Uint32 SDL_GetCPUFeatures() ...@@ -364,7 +364,7 @@ static Uint32 SDL_GetCPUFeatures()
return SDL_CPUFeatures; return SDL_CPUFeatures;
} }
SDL_bool SDL_HasRDTSC() SDL_bool SDL_HasRDTSC(void)
{ {
if ( SDL_GetCPUFeatures() & CPU_HAS_RDTSC ) { if ( SDL_GetCPUFeatures() & CPU_HAS_RDTSC ) {
return SDL_TRUE; return SDL_TRUE;
...@@ -372,7 +372,7 @@ SDL_bool SDL_HasRDTSC() ...@@ -372,7 +372,7 @@ SDL_bool SDL_HasRDTSC()
return SDL_FALSE; return SDL_FALSE;
} }
SDL_bool SDL_HasMMX() SDL_bool SDL_HasMMX(void)
{ {
if ( SDL_GetCPUFeatures() & CPU_HAS_MMX ) { if ( SDL_GetCPUFeatures() & CPU_HAS_MMX ) {
return SDL_TRUE; return SDL_TRUE;
...@@ -380,7 +380,7 @@ SDL_bool SDL_HasMMX() ...@@ -380,7 +380,7 @@ SDL_bool SDL_HasMMX()
return SDL_FALSE; return SDL_FALSE;
} }
SDL_bool SDL_HasMMXExt() SDL_bool SDL_HasMMXExt(void)
{ {
if ( SDL_GetCPUFeatures() & CPU_HAS_MMXEXT ) { if ( SDL_GetCPUFeatures() & CPU_HAS_MMXEXT ) {
return SDL_TRUE; return SDL_TRUE;
...@@ -388,7 +388,7 @@ SDL_bool SDL_HasMMXExt() ...@@ -388,7 +388,7 @@ SDL_bool SDL_HasMMXExt()
return SDL_FALSE; return SDL_FALSE;
} }
SDL_bool SDL_Has3DNow() SDL_bool SDL_Has3DNow(void)
{ {
if ( SDL_GetCPUFeatures() & CPU_HAS_3DNOW ) { if ( SDL_GetCPUFeatures() & CPU_HAS_3DNOW ) {
return SDL_TRUE; return SDL_TRUE;
...@@ -396,7 +396,7 @@ SDL_bool SDL_Has3DNow() ...@@ -396,7 +396,7 @@ SDL_bool SDL_Has3DNow()
return SDL_FALSE; return SDL_FALSE;
} }
SDL_bool SDL_Has3DNowExt() SDL_bool SDL_Has3DNowExt(void)
{ {
if ( SDL_GetCPUFeatures() & CPU_HAS_3DNOWEXT ) { if ( SDL_GetCPUFeatures() & CPU_HAS_3DNOWEXT ) {
return SDL_TRUE; return SDL_TRUE;
...@@ -404,7 +404,7 @@ SDL_bool SDL_Has3DNowExt() ...@@ -404,7 +404,7 @@ SDL_bool SDL_Has3DNowExt()
return SDL_FALSE; return SDL_FALSE;
} }
SDL_bool SDL_HasSSE() SDL_bool SDL_HasSSE(void)
{ {
if ( SDL_GetCPUFeatures() & CPU_HAS_SSE ) { if ( SDL_GetCPUFeatures() & CPU_HAS_SSE ) {
return SDL_TRUE; return SDL_TRUE;
...@@ -412,7 +412,7 @@ SDL_bool SDL_HasSSE() ...@@ -412,7 +412,7 @@ SDL_bool SDL_HasSSE()
return SDL_FALSE; return SDL_FALSE;
} }
SDL_bool SDL_HasSSE2() SDL_bool SDL_HasSSE2(void)
{ {
if ( SDL_GetCPUFeatures() & CPU_HAS_SSE2 ) { if ( SDL_GetCPUFeatures() & CPU_HAS_SSE2 ) {
return SDL_TRUE; return SDL_TRUE;
...@@ -420,7 +420,7 @@ SDL_bool SDL_HasSSE2() ...@@ -420,7 +420,7 @@ SDL_bool SDL_HasSSE2()
return SDL_FALSE; return SDL_FALSE;
} }
SDL_bool SDL_HasAltiVec() SDL_bool SDL_HasAltiVec(void)
{ {
if ( SDL_GetCPUFeatures() & CPU_HAS_ALTIVEC ) { if ( SDL_GetCPUFeatures() & CPU_HAS_ALTIVEC ) {
return SDL_TRUE; return SDL_TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment