gallium: System z support
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Wed, 5 Jun 2013 08:26:29 +0000 (09:26 +0100)
committerBrian Paul <brianp@vmware.com>
Wed, 5 Jun 2013 14:36:24 +0000 (08:36 -0600)
The main change is to use MCJIT rather than the old JIT, which will never
be supported for System z.  The endianness part is by example since the
patch was tested on a glibc system.

Signed-off-by: Richard Sandiford <rsandifo@linux.vnet.ibm.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_init.c
src/gallium/include/pipe/p_config.h

index 4a428ee02ade6432e5eb1c698135715982d77417..3258f036ee60fdfc0cc6b244ef39efd2ceecda1d 100644 (file)
@@ -49,7 +49,7 @@
  *   - MC-JIT supports limited OSes (MacOSX and Linux)
  * - standard JIT in LLVM 3.1, with backports
  */
-#if defined(PIPE_ARCH_PPC_64)
+#if defined(PIPE_ARCH_PPC_64) || defined(PIPE_ARCH_S390)
 #  define USE_MCJIT 1
 #  define HAVE_AVX 0
 #elif HAVE_LLVM >= 0x0302 || (HAVE_LLVM == 0x0301 && defined(HAVE_JIT_AVX_SUPPORT))
index 9a09cee8fb964dcc5e890cebb1ca82cb7e1afa57..6b51160af6978eeb01ed6c511ff907ce6456cf0d 100644 (file)
 #endif
 #endif
 
+#if defined(__s390x__)
+#define PIPE_ARCH_S390
+#endif
+
 
 /*
  * Endian detection.
 
 #if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
 #define PIPE_ARCH_LITTLE_ENDIAN
-#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64)
+#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64) || defined(PIPE_ARCH_S390)
 #define PIPE_ARCH_BIG_ENDIAN
 #endif