Fix build bustaaaaage.
authorDavid Anderson <danderson@mozilla.com>
Mon, 30 Apr 2012 13:28:25 -0700
changeset 112431 c7b2066b5bbf7db806c8fcbd140495e516b7fb48
parent 112430 2427c5815cfa1686f367b795fce5917d20f975d0
child 112432 1b379d8c4a5253d35ae79ccad45190013e81cfef
push id1708
push userakeybl@mozilla.com
push dateMon, 19 Nov 2012 21:10:21 +0000
treeherdermozilla-beta@27b14fe50103 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone15.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
Fix build bustaaaaage.
js/src/assembler/assembler/AssemblerBufferWithConstantPool.h
js/src/ion/arm/MacroAssembler-arm.cpp
js/src/ion/x86/CodeGenerator-x86.cpp
--- a/js/src/assembler/assembler/AssemblerBufferWithConstantPool.h
+++ b/js/src/assembler/assembler/AssemblerBufferWithConstantPool.h
@@ -255,17 +255,28 @@ public:
     }
 
     void putIntWithConstantDouble(uint32_t insn, double constant)
     {
         flushIfNoSpaceFor(4, 8);
 
         m_loadOffsets.append(AssemblerBuffer::size());
         bool isReusable = false;
-        jsdpun dpun;
+
+        union DoublePun {
+            struct {
+#if defined(IS_LITTLE_ENDIAN) && !defined(FPU_IS_ARM_FPA)
+                uint32_t lo, hi;
+#else
+                uint32_t hi, lo;
+#endif
+            } s;
+            double d;
+        } dpun;
+
         dpun.d = constant;
         
         m_pool[m_numConsts] = dpun.s.lo;
         m_pool[m_numConsts+1] = dpun.s.hi;
         m_mask[m_numConsts] = static_cast<char>(isReusable ? ReusableConst : UniqueConst);
         m_mask[m_numConsts+1] = static_cast<char>(isReusable ? ReusableConst : UniqueConst);
 
         AssemblerBuffer::putInt(AssemblerType::patchConstantPoolLoad(insn, m_numConsts));
--- a/js/src/ion/arm/MacroAssembler-arm.cpp
+++ b/js/src/ion/arm/MacroAssembler-arm.cpp
@@ -1116,17 +1116,26 @@ void
 MacroAssemblerARM::ma_vneg(FloatRegister src, FloatRegister dest)
 {
     as_vneg(dest, src);
 }
 
 void
 MacroAssemblerARM::ma_vimm(double value, FloatRegister dest)
 {
-    jsdpun dpun;
+    union DoublePun {
+        struct {
+#if defined(IS_LITTLE_ENDIAN) && !defined(FPU_IS_ARM_FPA)
+            uint32_t lo, hi;
+#else
+            uint32_t hi, lo;
+#endif
+        } s;
+        double d;
+    } dpun;
     dpun.d = value;
     if ((dpun.s.lo) == 0) {
         if (dpun.s.hi == 0) {
             // to zero a register, load 1.0, then execute dN <- dN - dN
             VFPImm dblEnc(0x3FF00000);
             as_vimm(dest, dblEnc);
             as_vsub(dest, dest, dest);
             return;
--- a/js/src/ion/x86/CodeGenerator-x86.cpp
+++ b/js/src/ion/x86/CodeGenerator-x86.cpp
@@ -174,20 +174,23 @@ CodeGeneratorX86::linkAbsoluteLabels()
 
 bool
 CodeGeneratorX86::visitDouble(LDouble *ins)
 {
     const LDefinition *out = ins->getDef(0);
     const LConstantIndex *cindex = ins->getOperand(0)->toConstantIndex();
     const Value &v = graph.getConstant(cindex->index());
 
-    jsdpun dpun;
+    union DoublePun {
+        uint64_t u;
+        double d;
+    } dpun;
     dpun.d = v.toDouble();
 
-    if (dpun.u64 == 0) {
+    if (dpun.u == 0) {
         masm.xorpd(ToFloatRegister(out), ToFloatRegister(out));
         return true;
     }
 
     DeferredDouble *d = new DeferredDouble(cindex->index());
     if (!deferredDoubles_.append(d))
         return false;