Mercurial > libavcodec.hg
comparison ppc/check_altivec.c @ 7905:ae410599f388 libavcodec
spelling cosmetics
author | diego |
---|---|
date | Mon, 22 Sep 2008 05:40:52 +0000 |
parents | 47717d5239fa |
children | eebc7209c47f |
comparison
equal
deleted
inserted
replaced
7904:47717d5239fa | 7905:ae410599f388 |
---|---|
34 #include <interfaces/exec.h> | 34 #include <interfaces/exec.h> |
35 #include <proto/exec.h> | 35 #include <proto/exec.h> |
36 #endif /* __APPLE__ */ | 36 #endif /* __APPLE__ */ |
37 | 37 |
38 /** | 38 /** |
39 * This function MAY rely on signal() or fork() in order to make sure altivec | 39 * This function MAY rely on signal() or fork() in order to make sure AltiVec |
40 * is present | 40 * is present. |
41 */ | 41 */ |
42 | 42 |
43 int has_altivec(void) | 43 int has_altivec(void) |
44 { | 44 { |
45 #ifdef __AMIGAOS4__ | 45 #ifdef __AMIGAOS4__ |
63 | 63 |
64 if (err == 0) return has_vu != 0; | 64 if (err == 0) return has_vu != 0; |
65 return 0; | 65 return 0; |
66 #elif defined(RUNTIME_CPUDETECT) | 66 #elif defined(RUNTIME_CPUDETECT) |
67 int proc_ver; | 67 int proc_ver; |
68 // support of mfspr PVR emulation added in Linux 2.6.17 | 68 // Support of mfspr PVR emulation added in Linux 2.6.17. |
69 asm volatile("mfspr %0, 287" : "=r" (proc_ver)); | 69 asm volatile("mfspr %0, 287" : "=r" (proc_ver)); |
70 proc_ver >>= 16; | 70 proc_ver >>= 16; |
71 if (proc_ver & 0x8000 || | 71 if (proc_ver & 0x8000 || |
72 proc_ver == 0x000c || | 72 proc_ver == 0x000c || |
73 proc_ver == 0x0039 || proc_ver == 0x003c || | 73 proc_ver == 0x0039 || proc_ver == 0x003c || |
74 proc_ver == 0x0044 || proc_ver == 0x0045 || | 74 proc_ver == 0x0044 || proc_ver == 0x0045 || |
75 proc_ver == 0x0070) | 75 proc_ver == 0x0070) |
76 return 1; | 76 return 1; |
77 return 0; | 77 return 0; |
78 #else | 78 #else |
79 // since we were compiled for altivec, just assume we have it | 79 // Since we were compiled for AltiVec, just assume we have it |
80 // until someone comes up with a proper way (not involving signal hacks). | 80 // until someone comes up with a proper way (not involving signal hacks). |
81 return 1; | 81 return 1; |
82 #endif /* __AMIGAOS4__ */ | 82 #endif /* __AMIGAOS4__ */ |
83 } | 83 } |
84 | 84 |