From 827874e3e7b6ca5d2a22c860b1e975505e912cf0 Mon Sep 17 00:00:00 2001 From: Joe Myre Date: Thu, 4 Aug 2005 17:46:01 +0000 Subject: [PATCH] Segmented out some x86 asm code for proper builds on PPC git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@55 7f574dfc-610e-0410-a909-a81674777703 --- Conky.kdevelop | 53 +++++++++++++++++++++++++------------------------- linux.c | 8 ++++++-- 2 files changed, 33 insertions(+), 28 deletions(-) diff --git a/Conky.kdevelop b/Conky.kdevelop index 748a1019..970a4448 100644 --- a/Conky.kdevelop +++ b/Conky.kdevelop @@ -11,10 +11,11 @@ false + - conky + src/Conky debug @@ -35,26 +36,9 @@ kdevgccoptions kdevgppoptions kdevpgf77options - -fomit-frame-pointer -O2 -fexceptions + -O2 -pipe --prefix=/usr --enable-mpd --enable-xft --enable-seti --enable-double-buffer --enable-own-window --enable-metar --enable-mldonkey - - - - - - - - - - - --enable-debug=full --prefix=/usr --enable-mpd --enable-xft --enable-seti --enable-double-buffer --enable-own-window --enable-metar --enable-mldonkey - debug - kdevgccoptions - kdevgppoptions - kdevpgf77options - -O2 -Wall -fexceptions -fomit-frame-pointer -fshort-enums -g3 - @@ -63,6 +47,23 @@ + + + --enable-debug=full --prefix=/usr --enable-xft --enable-double-buffer --enable-own-window --enable-metar --enable-mldonkey + debug + kdevgccoptions + kdevgppoptions + kdevpgf77options + -O2 -Wall + + + + + + + + -O2 -Wall + @@ -73,15 +74,15 @@ true 1 false - + 0 - /usr/bin/libtool + libtool - /usr/bin/ + @@ -165,7 +166,7 @@ 250 - + set m_,_ theValue @@ -191,9 +192,9 @@ - - - + + + diff --git a/linux.c b/linux.c index b32e644b..9982a0a8 100644 --- a/linux.c +++ b/linux.c @@ -647,13 +647,14 @@ char *get_adt746x_cpu() * */ +#if defined(CPU_X86) __inline__ unsigned long long int rdtsc() { unsigned long long int x; __asm__ volatile (".byte 0x0f, 0x31":"=A" (x)); return x; } - +#endif static char *buffer = NULL; char *get_freq() @@ -669,13 +670,16 @@ char *get_freq() /* get this function in cached memory */ gettimeofday(&tvstart, &tz); + #if defined(CPU_X86) cycles[0] = rdtsc(); + #endif gettimeofday(&tvstart, &tz); /* we don't trust that this is any specific length of time */ usleep(100); - + #if defined(CPU_X86) cycles[1] = rdtsc(); + #endif gettimeofday(&tvstop, &tz); microseconds = ((tvstop.tv_sec - tvstart.tv_sec) * 1000000) + (tvstop.tv_usec - tvstart.tv_usec);