[zeromq-dev] s390x support

Neale Ferguson neale at sinenomine.net
Fri Jan 7 21:28:07 CET 2011


Hi,
 I have built 2.1.0 under Linux on System z (aka s390x). I made a couple of
changes to enable PGM support:

diff --git a/configure.in b/configure.in
index 9c03518..dbbf2d9 100644
--- a/configure.in
+++ b/configure.in
@@ -283,7 +283,7 @@ if test "x$with_pgm_ext" != "xno"; then
     AC_MSG_CHECKING([if the PGM extension is supported on this platform])
     # OpenPGM is only supported by the vendor on x86, AMD64, and SPARC
platforms...
     case "${host_cpu}" in
-        i*86|x86_64|amd64|*sparc*)
+        i*86|x86_64|amd64|*sparc*|s390*)
             # Supported
         ;;
         *)
diff --git a/src/clock.cpp b/src/clock.cpp
index e18a715..63750e7 100644
--- a/src/clock.cpp
+++ b/src/clock.cpp
@@ -106,6 +106,10 @@ uint64_t zmq::clock_t::rdtsc ()
     } tsc;
     asm("rdtsc" : "=a" (tsc.u32val [0]), "=d" (tsc.u32val [1]));
     return tsc.u64val;
+#elif defined(__s390__)
+    uint64_t tsc;
+    asm("\tstck\t%0\n" : "=Q" (tsc) : : "cc");
+    return(tsc);
 #else
     return 0;
 #endif

I also made a change in time.c in libpgm. Where is the canonical source for
this so I can submit the change to the package owner?

Neale




More information about the zeromq-dev mailing list