On Wed, Jun 5, 2013 at 2:26 AM, Richard Sandiford <span dir="ltr"><<a href="mailto:rsandifo@linux.vnet.ibm.com" target="_blank">rsandifo@linux.vnet.ibm.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The main change is to use MCJIT rather than the old JIT, which will never<br>
be supported for System z.  The endianness part is by example since the<br>
patch was tested on a glibc system.<br>
<br>
Signed-off-by: Richard Sandiford <<a href="mailto:rsandifo@linux.vnet.ibm.com">rsandifo@linux.vnet.ibm.com</a>><br>
---<br>
 src/gallium/auxiliary/gallivm/lp_bld_init.c | 2 +-<br>
 src/gallium/include/pipe/p_config.h         | 6 +++++-<br>
 2 files changed, 6 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c<br>
index 050eba7..f0dc8cb 100644<br>
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c<br>
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c<br>
@@ -49,7 +49,7 @@<br>
  *   - MC-JIT supports limited OSes (MacOSX and Linux)<br>
  * - standard JIT in LLVM 3.1, with backports<br>
  */<br>
-#if defined(PIPE_ARCH_PPC_64)<br>
+#if defined(PIPE_ARCH_PPC_64) || defined(PIPE_ARCH_S390)<br>
 #  define USE_MCJIT 1<br>
 #  define HAVE_AVX 0<br>
 #elif HAVE_LLVM >= 0x0302 || (HAVE_LLVM == 0x0301 && defined(HAVE_JIT_AVX_SUPPORT))<br>
diff --git a/src/gallium/include/pipe/p_config.h b/src/gallium/include/pipe/p_config.h<br>
index 9a09cee..6b51160 100644<br>
--- a/src/gallium/include/pipe/p_config.h<br>
+++ b/src/gallium/include/pipe/p_config.h<br>
@@ -110,6 +110,10 @@<br>
 #endif<br>
 #endif<br>
<br>
+#if defined(__s390x__)<br>
+#define PIPE_ARCH_S390<br>
+#endif<br>
+<br>
<br>
 /*<br>
  * Endian detection.<br>
@@ -146,7 +150,7 @@<br>
<br>
 #if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)<br>
 #define PIPE_ARCH_LITTLE_ENDIAN<br>
-#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64)<br>
+#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64) || defined(PIPE_ARCH_S390)<br>
 #define PIPE_ARCH_BIG_ENDIAN<br>
 #endif<br>
<span class="HOEnZb"><font color="#888888"><br>
<br></font></span></blockquote><div>Looks good to me.  I'll push this in a bit.<br><br>-Brian<br> <br></div></div><br>