summaryrefslogtreecommitdiffstats
path: root/cpudetect.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpudetect.c')
-rw-r--r--cpudetect.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/cpudetect.c b/cpudetect.c
index e6e8a86f25..592eb65090 100644
--- a/cpudetect.c
+++ b/cpudetect.c
@@ -29,8 +29,8 @@ CpuCaps gCpuCaps;
#include <proto/exec.h>
#endif
-/* Thanks to the FreeBSD project for some of this cpuid code, and
- * help understanding how to use it. Thanks to the Mesa
+/* Thanks to the FreeBSD project for some of this cpuid code, and
+ * help understanding how to use it. Thanks to the Mesa
* team for SSE support detection and more cpu detect code.
*/
@@ -52,19 +52,19 @@ static int has_cpuid(void)
"pushfl\n\t"
"pop %0\n\t"
"mov %0, %1\n\t"
-
+
/* ... Toggle the ID bit in one copy and store */
/* to the EFLAGS reg */
"xor $0x200000, %0\n\t"
"push %0\n\t"
"popfl\n\t"
-
+
/* ... Get the (hopefully modified) EFLAGS */
"pushfl\n\t"
"pop %0\n\t"
: "=a" (a), "=c" (c)
:
- : "cc"
+ : "cc"
);
return a != c;
@@ -86,7 +86,7 @@ do_cpuid(unsigned int ax, unsigned int *p)
("mov %%"REG_b", %%"REG_S"\n\t"
"cpuid\n\t"
"xchg %%"REG_b", %%"REG_S
- : "=a" (p[0]), "=S" (p[1]),
+ : "=a" (p[0]), "=S" (p[1]),
"=c" (p[2]), "=d" (p[3])
: "0" (ax));
#endif
@@ -274,7 +274,7 @@ LONG CALLBACK win32_sig_handler_sse(EXCEPTION_POINTERS* ep)
if(ep->ExceptionRecord->ExceptionCode==EXCEPTION_ILLEGAL_INSTRUCTION){
mp_msg(MSGT_CPUDETECT,MSGL_V, "SIGILL, " );
ep->ContextRecord->Eip +=3;
- gCpuCaps.hasSSE=0;
+ gCpuCaps.hasSSE=0;
return EXCEPTION_CONTINUE_EXECUTION;
}
return EXCEPTION_CONTINUE_SEARCH;
@@ -305,7 +305,7 @@ ULONG _System os2_sig_handler_sse( PEXCEPTIONREPORTRECORD p1,
* and RedHat patched 2.2 kernels that have broken exception handling
* support for user space apps that do SSE.
*/
-
+
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
#define SSE_SYSCTL_NAME "hw.instruction_sse"
#elif defined(__APPLE__)
@@ -433,7 +433,7 @@ static void sigill_handler (int sig)
signal (sig, SIG_DFL);
raise (sig);
}
-
+
canjump = 0;
siglongjmp (jmpbuf, 1);
}
@@ -455,7 +455,7 @@ void GetCpuCaps( CpuCaps *caps)
caps->hasSSE4a=0;
caps->isX86=0;
caps->hasAltiVec = 0;
-#if HAVE_ALTIVEC
+#if HAVE_ALTIVEC
#ifdef __APPLE__
/*
rip-off from ffmpeg altivec detection code.
@@ -467,7 +467,7 @@ void GetCpuCaps( CpuCaps *caps)
size_t len = sizeof(has_vu);
int err;
- err = sysctl(sels, 2, &has_vu, &len, NULL, 0);
+ err = sysctl(sels, 2, &has_vu, &len, NULL, 0);
if (err == 0)
if (has_vu != 0)
@@ -488,12 +488,12 @@ void GetCpuCaps( CpuCaps *caps)
signal (SIGILL, SIG_DFL);
} else {
canjump = 1;
-
+
__asm__ volatile ("mtspr 256, %0\n\t"
"vand %%v0, %%v0, %%v0"
:
: "r" (-1));
-
+
signal (SIGILL, SIG_DFL);
caps->hasAltiVec = 1;
}