Backed out changeset 1c4f0a3784f1 (bug 1287671) for jit-test bustages
authorIris Hsiao <ihsiao@mozilla.com>
Tue, 04 Oct 2016 17:05:04 +0800
changeset 316316 e548982279e20c4d863b454f9c115f0138a2c07f
parent 316315 6602778444ff65cf38526106dbbe8025050bd1db
child 316317 114ae8fb1a77e97ef7415a4264928960a8e8c1b7
push id32800
push userihsiao@mozilla.com
push dateTue, 04 Oct 2016 09:05:28 +0000
treeherderautoland@114ae8fb1a77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1287671
milestone52.0a1
backs out1c4f0a3784f13790876a1eac902d63fa8b9569d2
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
Backed out changeset 1c4f0a3784f1 (bug 1287671) for jit-test bustages CLOSED TREE
js/public/Value.h
js/src/jit/Lowering.cpp
js/src/jit/MacroAssembler.h
js/src/jsatom.cpp
js/src/jscpucfg.h
js/src/jsdtoa.cpp
js/src/vm/TypedArrayObject.cpp
--- a/js/public/Value.h
+++ b/js/public/Value.h
@@ -232,17 +232,17 @@ typedef enum JSWhyMagic
     JS_UNINITIALIZED_LEXICAL,
 
     /** for local use */
     JS_GENERIC_MAGIC,
 
     JS_WHY_MAGIC_COUNT
 } JSWhyMagic;
 
-#if defined(MOZ_LITTLE_ENDIAN)
+#if defined(IS_LITTLE_ENDIAN)
 # if defined(JS_NUNBOX32)
 typedef union jsval_layout
 {
     uint64_t asBits;
     struct {
         union {
             int32_t        i32;
             uint32_t       u32;
@@ -280,17 +280,17 @@ typedef union jsval_layout
         } payload;
     } s;
     double asDouble;
     void* asPtr;
     size_t asWord;
     uintptr_t asUIntPtr;
 } JSVAL_ALIGNMENT jsval_layout;
 # endif  /* JS_PUNBOX64 */
-#else   /* defined(MOZ_LITTLE_ENDIAN) */
+#else   /* defined(IS_LITTLE_ENDIAN) */
 # if defined(JS_NUNBOX32)
 typedef union jsval_layout
 {
     uint64_t asBits;
     struct {
         JSValueTag tag;
         union {
             int32_t        i32;
@@ -326,17 +326,17 @@ typedef union jsval_layout
         } payload;
     } s;
     double asDouble;
     void* asPtr;
     size_t asWord;
     uintptr_t asUIntPtr;
 } JSVAL_ALIGNMENT jsval_layout;
 # endif /* JS_PUNBOX64 */
-#endif  /* defined(MOZ_LITTLE_ENDIAN) */
+#endif  /* defined(IS_LITTLE_ENDIAN) */
 
 JS_STATIC_ASSERT(sizeof(jsval_layout) == 8);
 
 /*
  * For codesize purposes on some platforms, it's important that the
  * compiler know that JS::Values constructed from constant values can be
  * folded to constant bit patterns at compile time, rather than
  * constructed at runtime.  Doing this requires a fair amount of C++11
--- a/js/src/jit/Lowering.cpp
+++ b/js/src/jit/Lowering.cpp
@@ -61,17 +61,17 @@ LIRGenerator::visitParameter(MParameter*
     else
         offset = 1 + param->index();
 
     LParameter* ins = new(alloc()) LParameter;
     defineBox(ins, param, LDefinition::FIXED);
 
     offset *= sizeof(Value);
 #if defined(JS_NUNBOX32)
-# if defined(MOZ_BIG_ENDIAN)
+# if defined(IS_BIG_ENDIAN)
     ins->getDef(0)->setOutput(LArgument(offset));
     ins->getDef(1)->setOutput(LArgument(offset + 4));
 # else
     ins->getDef(0)->setOutput(LArgument(offset + 4));
     ins->getDef(1)->setOutput(LArgument(offset));
 # endif
 #elif defined(JS_PUNBOX64)
     ins->getDef(0)->setOutput(LArgument(offset));
--- a/js/src/jit/MacroAssembler.h
+++ b/js/src/jit/MacroAssembler.h
@@ -174,17 +174,17 @@ using mozilla::FloatingPoint;
 
 # define DEFINED_ON(...)                                \
     DEFINED_ON_MAP_ON_ARCHS((none, __VA_ARGS__))
 
 # define PER_ARCH DEFINED_ON(ALL_ARCH)
 # define PER_SHARED_ARCH DEFINED_ON(ALL_SHARED_ARCH)
 
 
-#ifdef MOZ_LITTLE_ENDIAN
+#ifdef IS_LITTLE_ENDIAN
 #define IMM32_16ADJ(X) X << 16
 #else
 #define IMM32_16ADJ(X) X
 #endif
 
 namespace js {
 namespace jit {
 
--- a/js/src/jsatom.cpp
+++ b/js/src/jsatom.cpp
@@ -563,17 +563,17 @@ js::XDRAtom(XDRState<mode>* xdr, Mutable
     bool latin1 = lengthAndEncoding & 0x1;
 
     JSContext* cx = xdr->cx();
     JSAtom* atom;
     if (latin1) {
         const Latin1Char* chars = reinterpret_cast<const Latin1Char*>(xdr->buf.read(length));
         atom = AtomizeChars(cx, chars, length);
     } else {
-#if MOZ_LITTLE_ENDIAN
+#if IS_LITTLE_ENDIAN
         /* Directly access the little endian chars in the XDR buffer. */
         const char16_t* chars = reinterpret_cast<const char16_t*>(xdr->buf.read(length * sizeof(char16_t)));
         atom = AtomizeChars(cx, chars, length);
 #else
         /*
          * We must copy chars to a temporary buffer to convert between little and
          * big endian data.
          */
@@ -591,17 +591,17 @@ js::XDRAtom(XDRState<mode>* xdr, Mutable
             if (!chars)
                 return false;
         }
 
         JS_ALWAYS_TRUE(xdr->codeChars(chars, length));
         atom = AtomizeChars(cx, chars, length);
         if (chars != stackChars)
             js_free(chars);
-#endif /* !MOZ_LITTLE_ENDIAN */
+#endif /* !IS_LITTLE_ENDIAN */
     }
 
     if (!atom)
         return false;
     atomp.set(atom);
     return true;
 }
 
--- a/js/src/jscpucfg.h
+++ b/js/src/jscpucfg.h
@@ -4,16 +4,26 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef jscpucfg_h
 #define jscpucfg_h
 
 #include "mozilla/EndianUtils.h"
 
+#if defined(MOZ_LITTLE_ENDIAN)
+# define IS_LITTLE_ENDIAN 1
+# undef  IS_BIG_ENDIAN
+#elif defined(MOZ_BIG_ENDIAN)
+# undef  IS_LITTLE_ENDIAN
+# define IS_BIG_ENDIAN 1
+#else
+# error "Cannot determine endianness of your platform. Please add support to jscpucfg.h."
+#endif
+
 #ifndef JS_STACK_GROWTH_DIRECTION
 # ifdef __hppa
 #  define JS_STACK_GROWTH_DIRECTION (1)
 # else
 #  define JS_STACK_GROWTH_DIRECTION (-1)
 # endif
 #endif
 
--- a/js/src/jsdtoa.cpp
+++ b/js/src/jsdtoa.cpp
@@ -11,17 +11,17 @@
 #include "jsdtoa.h"
 
 #include "jsprf.h"
 #include "jstypes.h"
 #include "jsutil.h"
 
 using namespace js;
 
-#ifdef MOZ_LITTLE_ENDIAN
+#ifdef IS_LITTLE_ENDIAN
 #define IEEE_8087
 #else
 #define IEEE_MC68k
 #endif
 
 #ifndef Long
 #define Long int32_t
 #endif
--- a/js/src/vm/TypedArrayObject.cpp
+++ b/js/src/vm/TypedArrayObject.cpp
@@ -1779,17 +1779,17 @@ DataViewObject::getDataPointer(JSContext
 
     MOZ_ASSERT(offset < UINT32_MAX);
     return static_cast<uint8_t*>(obj->dataPointer()) + uint32_t(offset);
 }
 
 static inline bool
 needToSwapBytes(bool littleEndian)
 {
-#if MOZ_LITTLE_ENDIAN
+#if IS_LITTLE_ENDIAN
     return !littleEndian;
 #else
     return littleEndian;
 #endif
 }
 
 static inline uint8_t
 swapBytes(uint8_t x)