[Liboil-commit] 3 commits - configure.ac liboil/liboilcpu-misc.c liboil/liboilcpu.c testsuite/mmx_engine.c
David Schleef
ds at kemper.freedesktop.org
Mon May 12 23:18:29 PDT 2008
configure.ac | 15 +++++++++++++++
liboil/liboilcpu-misc.c | 2 +-
liboil/liboilcpu.c | 6 ++++--
testsuite/mmx_engine.c | 4 ++--
4 files changed, 22 insertions(+), 5 deletions(-)
New commits:
commit 390722e3fac4dc66f4a9773be04ee745e1ed1e53
Author: David Schleef <ds at ginger.bigkitten.com>
Date: Mon May 12 23:17:54 2008 -0700
Disable psadbw, since it requires SSE3
diff --git a/testsuite/mmx_engine.c b/testsuite/mmx_engine.c
index e18775d..d6eae61 100644
--- a/testsuite/mmx_engine.c
+++ b/testsuite/mmx_engine.c
@@ -192,7 +192,7 @@ void mmx_engine_test(void)
CHECK_LATENCY(punpckldq)
CHECK_LATENCY(punpcklwd)
CHECK_LATENCY(pxor)
- CHECK_LATENCY(psadbw)
+ //CHECK_LATENCY(psadbw)
#define CHECK_THROUGHPUT(insn) \
oil_profile_init (&prof); \
@@ -277,7 +277,7 @@ void mmx_engine_test(void)
CHECK_THROUGHPUT(punpckldq)
CHECK_THROUGHPUT(punpcklwd)
CHECK_THROUGHPUT(pxor)
- CHECK_THROUGHPUT(psadbw)
+ //CHECK_THROUGHPUT(psadbw)
#undef CHECK_LATENCY
#undef CHECK_THROUGHPUT
commit e7aab61f40b29faf019feb1c6b40edf13188559a
Author: David Schleef <ds at ginger.bigkitten.com>
Date: Mon May 12 22:15:10 2008 -0700
Fix timestamp on s390, patch from Fedora. Fixes #15392.
diff --git a/liboil/liboilcpu-misc.c b/liboil/liboilcpu-misc.c
index 3f30242..97b740c 100644
--- a/liboil/liboilcpu-misc.c
+++ b/liboil/liboilcpu-misc.c
@@ -87,7 +87,7 @@ static unsigned long
oil_profile_stamp_s390(void)
{
uint64_t ts;
- __asm__ __volatile__ ("STCK %0\n" : : "m" (ts));
+ __asm__ __volatile__ ("STCK %0(%0)\n" : : "r" (&ts));
return ts;
}
commit 83b9d6544377161ab43de255fd6fe5f5251ec5b7
Author: David Schleef <ds at ginger.bigkitten.com>
Date: Mon May 12 22:10:40 2008 -0700
Add check for monotonic clock. Patch from Jens Granseuer <jensgr at gmx.net>
diff --git a/configure.ac b/configure.ac
index 642932c..bfe8535 100644
--- a/configure.ac
+++ b/configure.ac
@@ -152,6 +152,21 @@ AC_CHECK_LIB(rt, clock_gettime,
)
AC_SUBST(LIBRT)
+AC_CACHE_CHECK(for monotonic clocks,
+ oil_cv_monotonic_clock,AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <time.h>
+#include <unistd.h>
+int main() {
+#if !(defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 && defined(CLOCK_MONOTONIC))
+ #error No monotonic clock
+#endif
+ return 0;
+}
+]])],oil_cv_monotonic_clock=yes,oil_cv_monotonic_clock=no))
+if test "$oil_cv_monotonic_clock" = "yes"; then
+ AC_DEFINE(HAVE_MONOTONIC_CLOCK,1,[Defined if we have a monotonic clock])
+fi
+
AS_COMPILER_FLAG(-Wall, LIBOIL_CFLAGS="$LIBOIL_CFLAGS -Wall")
if test "x$LIBOIL_CVS" = "xyes"
then
diff --git a/liboil/liboilcpu.c b/liboil/liboilcpu.c
index cada253..8fc88ae 100644
--- a/liboil/liboilcpu.c
+++ b/liboil/liboilcpu.c
@@ -57,6 +57,8 @@
#include <sys/auxv.h>
#endif
+
+
/**
* SECTION:liboilcpu
* @title: CPU
@@ -80,7 +82,7 @@ oil_profile_stamp_gtod (void)
}
#endif
-#ifdef HAVE_CLOCK_GETTIME
+#if defined(HAVE_CLOCK_GETTIME) && defined(HAVE_MONOTONIC_CLOCK)
static unsigned long
oil_profile_stamp_clock_gettime (void)
{
@@ -117,7 +119,7 @@ _oil_cpu_init (void)
OIL_INFO ("cpu flags %08lx", oil_cpu_flags);
-#ifdef HAVE_CLOCK_GETTIME
+#if defined(HAVE_CLOCK_GETTIME) && defined(HAVE_MONOTONIC_CLOCK)
if (_oil_profile_stamp == NULL) {
_oil_profile_stamp = oil_profile_stamp_clock_gettime;
OIL_INFO("Using clock_gettime() as a timestamp function.");
More information about the Liboil-commit
mailing list