[Pcre-svn] [703] code/trunk/sljit: Small, MIPS related fix i…

Startseite
Nachricht löschen
Autor: Subversion repository
Datum:  
To: pcre-svn
Betreff: [Pcre-svn] [703] code/trunk/sljit: Small, MIPS related fix in the JIT compiler
Revision: 703
          http://vcs.pcre.org/viewvc?view=rev&revision=703
Author:   zherczeg
Date:     2011-09-20 17:27:11 +0100 (Tue, 20 Sep 2011)


Log Message:
-----------
Small, MIPS related fix in the JIT compiler

Modified Paths:
--------------
    code/trunk/sljit/sljitConfigInternal.h
    code/trunk/sljit/sljitNativeMIPS_common.c


Modified: code/trunk/sljit/sljitConfigInternal.h
===================================================================
--- code/trunk/sljit/sljitConfigInternal.h    2011-09-20 15:45:06 UTC (rev 702)
+++ code/trunk/sljit/sljitConfigInternal.h    2011-09-20 16:27:11 UTC (rev 703)
@@ -246,9 +246,18 @@
 #if !defined(SLJIT_BIG_ENDIAN) && !defined(SLJIT_LITTLE_ENDIAN)


/* These macros are useful for the application. */
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) || (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
#define SLJIT_BIG_ENDIAN 1
+
+#elif (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+
+#ifdef __MIPSEL__
+#define SLJIT_LITTLE_ENDIAN 1
#else
+#define SLJIT_BIG_ENDIAN 1
+#endif
+
+#else
#define SLJIT_LITTLE_ENDIAN 1
#endif


Modified: code/trunk/sljit/sljitNativeMIPS_common.c
===================================================================
--- code/trunk/sljit/sljitNativeMIPS_common.c    2011-09-20 15:45:06 UTC (rev 702)
+++ code/trunk/sljit/sljitNativeMIPS_common.c    2011-09-20 16:27:11 UTC (rev 703)
@@ -373,7 +373,7 @@
             }
             if (jump->flags & PATCH_J) {
                 SLJIT_ASSERT((addr & ~0xfffffff) == ((jump->addr + sizeof(sljit_ins)) & ~0xfffffff));
-                buf_ptr[0] |= (addr >> 2) & 0x0cffffff;
+                buf_ptr[0] |= (addr >> 2) & 0x03ffffff;
                 break;
             }