Bug 984018 - Fixed build on Arm64; r=nbp, a=lizzard
authorVictor Carlquist <victorcarlquist@gmail.com>
Thu, 17 Sep 2015 09:24:36 -0300
changeset 296445 ca85fe28dae7c283e0a0e92763beb1c63334d8ae
parent 296444 ae10da57b8db95b2be46f9c40b6ad196337e1096
child 296446 3bca8f003efa00fb0fe548e026d62a94a2473bb6
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp, lizzard
bugs984018
milestone43.0a2
Bug 984018 - Fixed build on Arm64; r=nbp, a=lizzard
js/src/jit/arm64/vixl/MozSimulator-vixl.cpp
js/src/jit/shared/Lowering-shared-inl.h
--- a/js/src/jit/arm64/vixl/MozSimulator-vixl.cpp
+++ b/js/src/jit/arm64/vixl/MozSimulator-vixl.cpp
@@ -115,17 +115,19 @@ void Simulator::init(Decoder* decoder, F
   // Print a warning about exclusive-access instructions, but only the first
   // time they are encountered. This warning can be silenced using
   // SilenceExclusiveAccessWarning().
   print_exclusive_access_warning_ = true;
 
   lock_ = PR_NewLock();
   if (!lock_)
     MOZ_CRASH("Could not allocate simulator lock.");
+#ifdef DEBUG
   lockOwner_ = nullptr;
+#endif
   redirection_ = nullptr;
 }
 
 
 Simulator* Simulator::Current() {
   return js::TlsPerThreadData.get()->simulator();
 }
 
--- a/js/src/jit/shared/Lowering-shared-inl.h
+++ b/js/src/jit/shared/Lowering-shared-inl.h
@@ -179,18 +179,22 @@ LIRGeneratorShared::defineReturn(LInstru
 template <size_t Ops, size_t Temps> void
 LIRGeneratorShared::defineSinCos(LInstructionHelper<2, Ops, Temps> *lir, MDefinition *mir,
                                  LDefinition::Policy policy)
 {
     MOZ_ASSERT(lir->isCall());
 
     uint32_t vreg = getVirtualRegister();
     lir->setDef(0, LDefinition(vreg, LDefinition::DOUBLE, LFloatReg(ReturnDoubleReg)));
-#if defined(JS_CODEGEN_ARM) || defined(JS_CODEGEN_ARM64)
-    lir->setDef(1, LDefinition(vreg + VREG_INCREMENT, LDefinition::DOUBLE, LFloatReg(d1)));
+#if defined(JS_CODEGEN_ARM)
+    lir->setDef(1, LDefinition(vreg + VREG_INCREMENT, LDefinition::DOUBLE,
+                LFloatReg(FloatRegister(FloatRegisters::d1, FloatRegister::Double))));
+#elif defined(JS_CODEGEN_ARM64)
+    lir->setDef(1, LDefinition(vreg + VREG_INCREMENT, LDefinition::DOUBLE,
+                LFloatReg(FloatRegister(FloatRegisters::d1, FloatRegisters::Double))));
 #elif defined(JS_CODEGEN_MIPS32)
     lir->setDef(1, LDefinition(vreg + VREG_INCREMENT, LDefinition::DOUBLE, LFloatReg(f2)));
 #elif defined(JS_CODEGEN_NONE)
     MOZ_CRASH();
 #elif defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64)
     lir->setDef(1, LDefinition(vreg + VREG_INCREMENT, LDefinition::DOUBLE, LFloatReg(xmm1)));
 #else
 #error "Unsupported architecture for SinCos"