Bug 963029 - AArch64 support for MFBT. r=froydnj
authorMarcin Juszkiewicz <mjuszkiewicz@redhat.com>
Thu, 23 Jan 2014 16:34:31 -0500
changeset 180993 89e06a821ad5986035de99c8bc1f9d7a99541b2a
parent 180992 feaf8bd56a82749f5d0d8869b7c0a1c01e300362
child 180994 f04502648f69b77c12c1e6efe333b73b8918a23d
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs963029
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 963029 - AArch64 support for MFBT. r=froydnj
mfbt/Endian.h
mfbt/tests/TestPoisonArea.cpp
--- a/mfbt/Endian.h
+++ b/mfbt/Endian.h
@@ -117,24 +117,24 @@
  * here because they're not present on all platforms.  Instead we have
  * this big conditional that ideally will catch all the interesting
  * cases.
  */
 #elif defined(__sparc) || defined(__sparc__) || \
       defined(_POWER) || defined(__powerpc__) || \
       defined(__ppc__) || defined(__hppa) || \
       defined(_MIPSEB) || defined(__ARMEB__) || \
-      defined(__s390__) || \
+      defined(__s390__) || defined(__AARCH64EB__) \
       (defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \
       (defined(__ia64) && defined(__BIG_ENDIAN__))
 #  define MOZ_BIG_ENDIAN 1
 #elif defined(__i386) || defined(__i386__) || \
       defined(__x86_64) || defined(__x86_64__) || \
       defined(_MIPSEL) || defined(__ARMEL__) || \
-      defined(__alpha__) || \
+      defined(__alpha__) || defined(__AARCH64EL__) \
       (defined(__sh__) && defined(__BIG_ENDIAN__)) || \
       (defined(__ia64) && !defined(__BIG_ENDIAN__))
 #  define MOZ_LITTLE_ENDIAN 1
 #endif
 
 #if MOZ_BIG_ENDIAN
 #  define MOZ_LITTLE_ENDIAN 0
 #elif MOZ_LITTLE_ENDIAN
--- a/mfbt/tests/TestPoisonArea.cpp
+++ b/mfbt/tests/TestPoisonArea.cpp
@@ -156,16 +156,19 @@
 /* On mipsel, jr ra needs to be followed by a nop.
    0x03e00008 as a 64 bits integer just does that */
 #define RETURN_INSTR_TYPE uint64_t
 #endif
 
 #elif defined __s390__
 #define RETURN_INSTR 0x07fe0000 /* br %r14 */
 
+#elif defined __aarch64__
+#define RETURN_INSTR 0xd65f03c0 /* ret */
+
 #elif defined __ia64
 struct ia64_instr { uint32_t i[4]; };
 static const ia64_instr _return_instr =
   {{ 0x00000011, 0x00000001, 0x80000200, 0x00840008 }}; /* br.ret.sptk.many b0 */
 
 #define RETURN_INSTR _return_instr
 #define RETURN_INSTR_TYPE ia64_instr