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:
parent
8252c37c75
commit
827874e3e7
@ -11,10 +11,11 @@
|
|||||||
<absoluteprojectpath>false</absoluteprojectpath>
|
<absoluteprojectpath>false</absoluteprojectpath>
|
||||||
<description></description>
|
<description></description>
|
||||||
<versioncontrol/>
|
<versioncontrol/>
|
||||||
|
<secondaryLanguages/>
|
||||||
</general>
|
</general>
|
||||||
<kdevautoproject>
|
<kdevautoproject>
|
||||||
<general>
|
<general>
|
||||||
<activetarget>conky</activetarget>
|
<activetarget>src/Conky</activetarget>
|
||||||
<useconfiguration>debug</useconfiguration>
|
<useconfiguration>debug</useconfiguration>
|
||||||
</general>
|
</general>
|
||||||
<run>
|
<run>
|
||||||
@ -35,26 +36,9 @@
|
|||||||
<ccompiler>kdevgccoptions</ccompiler>
|
<ccompiler>kdevgccoptions</ccompiler>
|
||||||
<cxxcompiler>kdevgppoptions</cxxcompiler>
|
<cxxcompiler>kdevgppoptions</cxxcompiler>
|
||||||
<f77compiler>kdevpgf77options</f77compiler>
|
<f77compiler>kdevpgf77options</f77compiler>
|
||||||
<cflags>-fomit-frame-pointer -O2 -fexceptions</cflags>
|
<cflags>-O2 -pipe</cflags>
|
||||||
<envvars/>
|
<envvars/>
|
||||||
<configargs>--prefix=/usr --enable-mpd --enable-xft --enable-seti --enable-double-buffer --enable-own-window --enable-metar --enable-mldonkey</configargs>
|
<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>
|
<topsourcedir></topsourcedir>
|
||||||
<cppflags></cppflags>
|
<cppflags></cppflags>
|
||||||
<ldflags></ldflags>
|
<ldflags></ldflags>
|
||||||
@ -63,6 +47,23 @@
|
|||||||
<f77compilerbinary></f77compilerbinary>
|
<f77compilerbinary></f77compilerbinary>
|
||||||
<cxxflags></cxxflags>
|
<cxxflags></cxxflags>
|
||||||
<f77flags></f77flags>
|
<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>
|
</debug>
|
||||||
</configurations>
|
</configurations>
|
||||||
<make>
|
<make>
|
||||||
@ -73,15 +74,15 @@
|
|||||||
<abortonerror>true</abortonerror>
|
<abortonerror>true</abortonerror>
|
||||||
<numberofjobs>1</numberofjobs>
|
<numberofjobs>1</numberofjobs>
|
||||||
<dontact>false</dontact>
|
<dontact>false</dontact>
|
||||||
<makebin/>
|
<makebin></makebin>
|
||||||
<prio>0</prio>
|
<prio>0</prio>
|
||||||
</make>
|
</make>
|
||||||
</kdevautoproject>
|
</kdevautoproject>
|
||||||
<kdevdebugger>
|
<kdevdebugger>
|
||||||
<general>
|
<general>
|
||||||
<dbgshell>/usr/bin/libtool</dbgshell>
|
<dbgshell>libtool</dbgshell>
|
||||||
<programargs></programargs>
|
<programargs></programargs>
|
||||||
<gdbpath>/usr/bin/</gdbpath>
|
<gdbpath></gdbpath>
|
||||||
<configGdbScript></configGdbScript>
|
<configGdbScript></configGdbScript>
|
||||||
<runShellScript></runShellScript>
|
<runShellScript></runShellScript>
|
||||||
<runGdbScript></runGdbScript>
|
<runGdbScript></runGdbScript>
|
||||||
@ -165,7 +166,7 @@
|
|||||||
<headerCompletionDelay>250</headerCompletionDelay>
|
<headerCompletionDelay>250</headerCompletionDelay>
|
||||||
</codecompletion>
|
</codecompletion>
|
||||||
<creategettersetter>
|
<creategettersetter>
|
||||||
<prefixGet></prefixGet>
|
<prefixGet/>
|
||||||
<prefixSet>set</prefixSet>
|
<prefixSet>set</prefixSet>
|
||||||
<prefixVariable>m_,_</prefixVariable>
|
<prefixVariable>m_,_</prefixVariable>
|
||||||
<parameterName>theValue</parameterName>
|
<parameterName>theValue</parameterName>
|
||||||
@ -191,9 +192,9 @@
|
|||||||
</cppsupportpart>
|
</cppsupportpart>
|
||||||
<kdevdocumentation>
|
<kdevdocumentation>
|
||||||
<projectdoc>
|
<projectdoc>
|
||||||
<docsystem/>
|
<docsystem></docsystem>
|
||||||
<docurl/>
|
<docurl></docurl>
|
||||||
<usermanualurl/>
|
<usermanualurl></usermanualurl>
|
||||||
</projectdoc>
|
</projectdoc>
|
||||||
</kdevdocumentation>
|
</kdevdocumentation>
|
||||||
<ctagspart>
|
<ctagspart>
|
||||||
|
8
linux.c
8
linux.c
@ -647,13 +647,14 @@ char *get_adt746x_cpu()
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(CPU_X86)
|
||||||
__inline__ unsigned long long int rdtsc()
|
__inline__ unsigned long long int rdtsc()
|
||||||
{
|
{
|
||||||
unsigned long long int x;
|
unsigned long long int x;
|
||||||
__asm__ volatile (".byte 0x0f, 0x31":"=A" (x));
|
__asm__ volatile (".byte 0x0f, 0x31":"=A" (x));
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
static char *buffer = NULL;
|
static char *buffer = NULL;
|
||||||
|
|
||||||
char *get_freq()
|
char *get_freq()
|
||||||
@ -669,13 +670,16 @@ char *get_freq()
|
|||||||
|
|
||||||
/* get this function in cached memory */
|
/* get this function in cached memory */
|
||||||
gettimeofday(&tvstart, &tz);
|
gettimeofday(&tvstart, &tz);
|
||||||
|
#if defined(CPU_X86)
|
||||||
cycles[0] = rdtsc();
|
cycles[0] = rdtsc();
|
||||||
|
#endif
|
||||||
gettimeofday(&tvstart, &tz);
|
gettimeofday(&tvstart, &tz);
|
||||||
|
|
||||||
/* we don't trust that this is any specific length of time */
|
/* we don't trust that this is any specific length of time */
|
||||||
usleep(100);
|
usleep(100);
|
||||||
|
#if defined(CPU_X86)
|
||||||
cycles[1] = rdtsc();
|
cycles[1] = rdtsc();
|
||||||
|
#endif
|
||||||
gettimeofday(&tvstop, &tz);
|
gettimeofday(&tvstop, &tz);
|
||||||
microseconds = ((tvstop.tv_sec - tvstart.tv_sec) * 1000000) +
|
microseconds = ((tvstop.tv_sec - tvstart.tv_sec) * 1000000) +
|
||||||
(tvstop.tv_usec - tvstart.tv_usec);
|
(tvstop.tv_usec - tvstart.tv_usec);
|
||||||
|
Loading…
Reference in New Issue
Block a user