michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * vim: set ts=8 sts=4 et sw=4 tw=99: michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef jit_arm_BaselineRegisters_arm_h michael@0: #define jit_arm_BaselineRegisters_arm_h michael@0: michael@0: #ifdef JS_ION michael@0: michael@0: #include "jit/IonMacroAssembler.h" michael@0: michael@0: namespace js { michael@0: namespace jit { michael@0: michael@0: // r15 = program-counter michael@0: // r14 = link-register michael@0: michael@0: // r13 = stack-pointer michael@0: // r11 = frame-pointer michael@0: static MOZ_CONSTEXPR_VAR Register BaselineFrameReg = r11; michael@0: static MOZ_CONSTEXPR_VAR Register BaselineStackReg = sp; michael@0: michael@0: // ValueOperands R0, R1, and R2. michael@0: // R0 == JSReturnReg, and R2 uses registers not michael@0: // preserved across calls. R1 value should be michael@0: // preserved across calls. michael@0: static MOZ_CONSTEXPR_VAR ValueOperand R0(r3, r2); michael@0: static MOZ_CONSTEXPR_VAR ValueOperand R1(r5, r4); michael@0: static MOZ_CONSTEXPR_VAR ValueOperand R2(r1, r0); michael@0: michael@0: // BaselineTailCallReg and BaselineStubReg michael@0: // These use registers that are not preserved across michael@0: // calls. michael@0: static MOZ_CONSTEXPR_VAR Register BaselineTailCallReg = r14; michael@0: static MOZ_CONSTEXPR_VAR Register BaselineStubReg = r9; michael@0: michael@0: static MOZ_CONSTEXPR_VAR Register ExtractTemp0 = InvalidReg; michael@0: static MOZ_CONSTEXPR_VAR Register ExtractTemp1 = InvalidReg; michael@0: michael@0: // Register used internally by MacroAssemblerARM. michael@0: static MOZ_CONSTEXPR_VAR Register BaselineSecondScratchReg = r6; michael@0: michael@0: // R7 - R9 are generally available for use within stubcode. michael@0: michael@0: // Note that BaselineTailCallReg is actually just the link michael@0: // register. In ARM code emission, we do not clobber BaselineTailCallReg michael@0: // since we keep the return address for calls there. michael@0: michael@0: // FloatReg0 must be equal to ReturnFloatReg. michael@0: static MOZ_CONSTEXPR_VAR FloatRegister FloatReg0 = d0; michael@0: static MOZ_CONSTEXPR_VAR FloatRegister FloatReg1 = d1; michael@0: michael@0: } // namespace jit michael@0: } // namespace js michael@0: michael@0: #endif // JS_ION michael@0: michael@0: #endif /* jit_arm_BaselineRegisters_arm_h */