Permalink
Browse files

TS-2922 Fixes for PPC-LE support

  • Loading branch information...
1 parent 0d493e2 commit 5513ba47aab354b3246bc7527bdcb703ce7c7b30 Breno Leitao committed with zwoop Jul 21, 2014
Showing with 5 additions and 1 deletion.
  1. +1 −1 lib/ts/ink_queue.h
  2. +4 −0 plugins/header_rewrite/lulu.h
View
@@ -134,7 +134,7 @@ extern "C"
#define FREELIST_VERSION(_x) (_x).s.version
#define SET_FREELIST_POINTER_VERSION(_x,_p,_v) \
(_x).s.pointer = _p; (_x).s.version = _v
-#elif defined(__x86_64__) || defined(__ia64__)
+#elif defined(__x86_64__) || defined(__ia64__) || defined(__powerpc64__)
#define FREELIST_POINTER(_x) ((void*)(((((intptr_t)(_x).data)<<16)>>16) | \
(((~((((intptr_t)(_x).data)<<16>>63)-1))>>48)<<48))) // sign extend
#define FREELIST_VERSION(_x) (((intptr_t)(_x).data)>>48)
@@ -53,6 +53,10 @@ char* getIP(sockaddr const* s_sockaddr, char res[INET6_ADDRSTRLEN]);
#define mb() __asm__ __volatile__ ( "sync" : : : "memory")
#define rmb() __asm__ __volatile__ ( "sync" : : : "memory")
#define wmb() __asm__ __volatile__ ( "" : : : "memory")
+#elif defined(__powerpc64__)
+#define mb() __asm__ __volatile__ ("sync" : : : "memory")
+#define rmb() __asm__ __volatile__ ("sync" : : : "memory")
+#define wmb() __asm__ __volatile__ ("sync" : : : "memory")
#else
#error "Define barriers"
#endif

0 comments on commit 5513ba4

Please sign in to comment.