[MPlayer-cvslog] CVS: main cpudetect.c,1.43,1.44
Alan Curry CVS
syncmail at mplayerhq.hu
Wed Mar 1 00:24:40 CET 2006
CVS change done by Alan Curry CVS
Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv6545
Modified Files:
cpudetect.c
Log Message:
add Amiga-style AltiVec detection, patch from andrea at amigasoft dot net
Index: cpudetect.c
===================================================================
RCS file: /cvsroot/mplayer/main/cpudetect.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- cpudetect.c 9 Feb 2006 14:07:51 -0000 1.43
+++ cpudetect.c 28 Feb 2006 23:24:38 -0000 1.44
@@ -33,6 +33,10 @@
#include <windows.h>
#endif
+#ifdef __AMIGAOS4__
+#include <proto/exec.h>
+#endif
+
//#define X86_FXSR_MAGIC
/* Thanks to the FreeBSD project for some of this cpuid code, and
* help understanding how to use it. Thanks to the Mesa
@@ -468,6 +472,7 @@
#ifdef SYS_DARWIN
#include <sys/sysctl.h>
#else
+#ifndef __AMIGAOS4__
#include <signal.h>
#include <setjmp.h>
@@ -484,6 +489,7 @@
canjump = 0;
siglongjmp (jmpbuf, 1);
}
+#endif //__AMIGAOS4__
#endif
void GetCpuCaps( CpuCaps *caps)
@@ -517,6 +523,13 @@
caps->hasAltiVec = 1;
}
#else /* SYS_DARWIN */
+#ifdef __AMIGAOS4__
+ ULONG result = 0;
+
+ GetCPUInfoTags(GCIT_VectorUnit, &result, TAG_DONE);
+ if (result == VECTORTYPE_ALTIVEC)
+ caps->hasAltiVec = 1;
+#else
/* no Darwin, do it the brute-force way */
/* this is borrowed from the libmpeg2 library */
{
@@ -535,6 +548,7 @@
caps->hasAltiVec = 1;
}
}
+#endif //__AMIGAOS4__
#endif /* SYS_DARWIN */
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"AltiVec %sfound\n", (caps->hasAltiVec ? "" : "not "));
#endif /* HAVE_ALTIVEC */
More information about the MPlayer-cvslog
mailing list