[Liboil-commit] liboil/liboilcpu-arm.c

David Schleef ds at kemper.freedesktop.org
Thu Mar 13 17:21:28 PDT 2008


 liboil/liboilcpu-arm.c |  143 -------------------------------------------------
 1 file changed, 2 insertions(+), 141 deletions(-)

New commits:
commit 301ac278cb7341eb3a515434fd9ef3403abce24c
Author: David Schleef <ds at ginger.bigkitten.com>
Date:   Thu Mar 13 17:23:26 2008 -0700

    Clean up ARM cpu detection.  Should be no changes.

diff --git a/liboil/liboilcpu-arm.c b/liboil/liboilcpu-arm.c
index b180487..583bf64 100644
--- a/liboil/liboilcpu-arm.c
+++ b/liboil/liboilcpu-arm.c
@@ -44,39 +44,6 @@
 #include <sys/time.h>
 #include <time.h>
 
-#if defined(__FreeBSD__)
-#include <sys/types.h>
-#include <sys/sysctl.h>
-#endif
-
-#ifdef __sun
-#include <sys/auxv.h>
-#endif
-
-/**
- * SECTION:liboilcpu
- * @title: CPU
- * @short_description: Check the capabilities of the current CPU
- *
- */
-
-extern unsigned long (*_oil_profile_stamp)(void);
-
-#if defined(__arm__)
-#define USE_CPUINFO
-#endif
-
-
-#ifdef HAVE_GETTIMEOFDAY
-static unsigned long
-oil_profile_stamp_gtod (void)
-{
-  struct timeval tv;
-  gettimeofday(&tv,NULL);
-  return 1000000*(unsigned long)tv.tv_sec + (unsigned long)tv.tv_usec;
-}
-#endif
-
 /***** arm *****/
 
 #ifdef __arm__
@@ -151,8 +118,8 @@ get_proc_cpuinfo (void)
   return cpuinfo;
 }
 
-static void
-oil_cpu_detect_arm(void)
+void
+oil_cpu_detect_arch(void)
 {
 #ifdef __linux__
   int arm_implementer = 0;
@@ -194,109 +161,3 @@ oil_cpu_detect_arm(void)
 #endif
 
 
-/***** alpha *****/
-
-#if defined(__alpha__)
-static unsigned long
-oil_profile_stamp_alpha(void)
-{
-	unsigned int ts;
-	__asm__ __volatile__ ("rpcc %0\n" : "=r"(ts));
-	return ts;
-}
-
-static void
-oil_cpu_detect_alpha(void)
-{
-  _oil_profile_stamp = oil_profile_stamp_alpha;
-}
-#endif
-
-/***** ia64 *****/
-
-#if defined(__ia64__)
-static unsigned long
-oil_profile_stamp_ia64(void)
-{
-	unsigned int ts;
-	__asm__ __volatile__("mov %0=ar.itc\n" : "=r"(ts) :: "memory");
-	return ts;
-}
-
-static void
-oil_cpu_detect_ia64(void)
-{
-  _oil_profile_stamp = oil_profile_stamp_ia64;
-}
-#endif
-
-/***** s390 *****/
-
-#if defined(__s390__)
-static unsigned long
-oil_profile_stamp_s390(void)
-{
-	uint64_t ts;
-	__asm__ __volatile__ ("STCK %0\n" : : "m" (ts));
-	return ts;
-}
-
-static void
-oil_cpu_detect_s390(void)
-{
-  _oil_profile_stamp = oil_profile_stamp_s390;
-}
-#endif
-
-/***** mips *****/
-
-#if defined(__mips__)
-#if 0
-/* broken */
-static unsigned long
-oil_profile_stamp_mips(void)
-{
-	unsigned int ts;
-	__asm__ __volatile__ (
-		"	.set	push		\n"
-		"	.set	reorder		\n"
-		"	mfc0	%0,$9		\n"
-		"	.set	pop		\n"
-	: "=m" (ts));
-	return ts;
-}
-#endif
-
-static void
-oil_cpu_detect_mips(void)
-{
-  //_oil_profile_stamp = oil_profile_stamp_mips;
-}
-#endif
-
-void
-oil_cpu_detect_arch(void)
-{
-#if defined(__i386__) || defined(__amd64__)
-  oil_cpu_detect_i386();
-#endif
-#if defined(__powerpc__) || defined(__PPC__) || defined(__ppc__)
-  oil_cpu_detect_powerpc();
-#endif
-#ifdef __arm__
-  oil_cpu_detect_arm();
-#endif
-#ifdef __alpha__
-  oil_cpu_detect_alpha();
-#endif
-#ifdef __ia64__
-  oil_cpu_detect_ia64();
-#endif
-#ifdef __s390__
-  oil_cpu_detect_s390();
-#endif
-#ifdef __mips__
-  oil_cpu_detect_mips();
-#endif
-}
-


More information about the Liboil-commit mailing list