Bug 964005 - Odinmonkey (ARM): Include d15 in the callee saved registers. r=mjrosenb
authorDouglas Crosher <dtc-moz@scieneer.com>
Sun, 26 Jan 2014 19:42:53 +1100
changeset 165621 ad73fa1d8abb5359610ad84eb9d9ad4b557fb188
parent 165620 f52e4fe3cf773deb3be2329560ef1cc3845dbd23
child 165622 be76dc85648200d3df4d4398e444ebee909d7a34
push id4623
push userryanvm@gmail.com
push dateTue, 28 Jan 2014 21:48:39 +0000
treeherderfx-team@7e79536aca0a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmjrosenb
bugs964005
milestone29.0a1
Bug 964005 - Odinmonkey (ARM): Include d15 in the callee saved registers. r=mjrosenb
js/src/jit/AsmJS.cpp
--- a/js/src/jit/AsmJS.cpp
+++ b/js/src/jit/AsmJS.cpp
@@ -5749,19 +5749,26 @@ CheckModuleReturn(ModuleCompiler &m)
     return true;
 }
 
 // All registers except the stack pointer.
 static const RegisterSet AllRegsExceptSP =
     RegisterSet(GeneralRegisterSet(Registers::AllMask &
                                    ~(uint32_t(1) << Registers::StackPointer)),
                 FloatRegisterSet(FloatRegisters::AllMask));
+#if defined(JS_CPU_ARM)
+// The ARM system ABI also includes d15 in the non volatile float registers.
+static const RegisterSet NonVolatileRegs =
+    RegisterSet(GeneralRegisterSet(Registers::NonVolatileMask),
+                    FloatRegisterSet(FloatRegisters::NonVolatileMask | (1 << FloatRegisters::d15)));
+#else
 static const RegisterSet NonVolatileRegs =
     RegisterSet(GeneralRegisterSet(Registers::NonVolatileMask),
                 FloatRegisterSet(FloatRegisters::NonVolatileMask));
+#endif
 
 static void
 LoadAsmJSActivationIntoRegister(MacroAssembler &masm, Register reg)
 {
     masm.movePtr(AsmJSImm_Runtime, reg);
     size_t offset = offsetof(JSRuntime, mainThread) +
                     PerThreadData::offsetOfAsmJSActivationStackReadOnly();
     masm.loadPtr(Address(reg, offset), reg);