1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 10:35:10 +00:00

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
This commit is contained in:
Joe Myre 2005-08-04 17:46:01 +00:00
parent 8252c37c75
commit 827874e3e7
2 changed files with 33 additions and 28 deletions

View File

@ -11,10 +11,11 @@
<absoluteprojectpath>false</absoluteprojectpath>
<description></description>
<versioncontrol/>
<secondaryLanguages/>
</general>
<kdevautoproject>
<general>
<activetarget>conky</activetarget>
<activetarget>src/Conky</activetarget>
<useconfiguration>debug</useconfiguration>
</general>
<run>
@ -35,26 +36,9 @@
<ccompiler>kdevgccoptions</ccompiler>
<cxxcompiler>kdevgppoptions</cxxcompiler>
<f77compiler>kdevpgf77options</f77compiler>
<cflags>-fomit-frame-pointer -O2 -fexceptions</cflags>
<cflags>-O2 -pipe</cflags>
<envvars/>
<configargs>--prefix=/usr --enable-mpd --enable-xft --enable-seti --enable-double-buffer --enable-own-window --enable-metar --enable-mldonkey</configargs>
<topsourcedir/>
<cppflags/>
<ldflags/>
<ccompilerbinary/>
<cxxcompilerbinary/>
<f77compilerbinary/>
<cxxflags/>
<f77flags/>
</optimized>
<debug>
<configargs>--enable-debug=full --prefix=/usr --enable-mpd --enable-xft --enable-seti --enable-double-buffer --enable-own-window --enable-metar --enable-mldonkey</configargs>
<builddir>debug</builddir>
<ccompiler>kdevgccoptions</ccompiler>
<cxxcompiler>kdevgppoptions</cxxcompiler>
<f77compiler>kdevpgf77options</f77compiler>
<cflags>-O2 -Wall -fexceptions -fomit-frame-pointer -fshort-enums -g3</cflags>
<envvars/>
<topsourcedir></topsourcedir>
<cppflags></cppflags>
<ldflags></ldflags>
@ -63,6 +47,23 @@
<f77compilerbinary></f77compilerbinary>
<cxxflags></cxxflags>
<f77flags></f77flags>
</optimized>
<debug>
<configargs>--enable-debug=full --prefix=/usr --enable-xft --enable-double-buffer --enable-own-window --enable-metar --enable-mldonkey</configargs>
<builddir>debug</builddir>
<ccompiler>kdevgccoptions</ccompiler>
<cxxcompiler>kdevgppoptions</cxxcompiler>
<f77compiler>kdevpgf77options</f77compiler>
<cflags>-O2 -Wall</cflags>
<envvars/>
<topsourcedir></topsourcedir>
<cppflags></cppflags>
<ldflags></ldflags>
<ccompilerbinary></ccompilerbinary>
<cxxcompilerbinary></cxxcompilerbinary>
<f77compilerbinary></f77compilerbinary>
<cxxflags>-O2 -Wall</cxxflags>
<f77flags></f77flags>
</debug>
</configurations>
<make>
@ -73,15 +74,15 @@
<abortonerror>true</abortonerror>
<numberofjobs>1</numberofjobs>
<dontact>false</dontact>
<makebin/>
<makebin></makebin>
<prio>0</prio>
</make>
</kdevautoproject>
<kdevdebugger>
<general>
<dbgshell>/usr/bin/libtool</dbgshell>
<dbgshell>libtool</dbgshell>
<programargs></programargs>
<gdbpath>/usr/bin/</gdbpath>
<gdbpath></gdbpath>
<configGdbScript></configGdbScript>
<runShellScript></runShellScript>
<runGdbScript></runGdbScript>
@ -165,7 +166,7 @@
<headerCompletionDelay>250</headerCompletionDelay>
</codecompletion>
<creategettersetter>
<prefixGet></prefixGet>
<prefixGet/>
<prefixSet>set</prefixSet>
<prefixVariable>m_,_</prefixVariable>
<parameterName>theValue</parameterName>
@ -191,9 +192,9 @@
</cppsupportpart>
<kdevdocumentation>
<projectdoc>
<docsystem/>
<docurl/>
<usermanualurl/>
<docsystem></docsystem>
<docurl></docurl>
<usermanualurl></usermanualurl>
</projectdoc>
</kdevdocumentation>
<ctagspart>

View File

@ -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);