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_MoveEmitter_arm_h michael@0: #define jit_arm_MoveEmitter_arm_h michael@0: michael@0: #include "jit/IonMacroAssembler.h" michael@0: #include "jit/MoveResolver.h" michael@0: michael@0: namespace js { michael@0: namespace jit { michael@0: michael@0: class CodeGenerator; michael@0: michael@0: class MoveEmitterARM michael@0: { michael@0: bool inCycle_; michael@0: MacroAssemblerARMCompat &masm; michael@0: michael@0: // Original stack push value. michael@0: uint32_t pushedAtStart_; michael@0: michael@0: // These store stack offsets to spill locations, snapshotting michael@0: // codegen->framePushed_ at the time they were allocated. They are -1 if no michael@0: // stack space has been allocated for that particular spill. michael@0: int32_t pushedAtCycle_; michael@0: int32_t pushedAtSpill_; michael@0: michael@0: // These are registers that are available for temporary use. They may be michael@0: // assigned InvalidReg. If no corresponding spill space has been assigned, michael@0: // then these registers do not need to be spilled. michael@0: Register spilledReg_; michael@0: FloatRegister spilledFloatReg_; michael@0: michael@0: void assertDone(); michael@0: Register tempReg(); michael@0: FloatRegister tempFloatReg(); michael@0: Operand cycleSlot() const; michael@0: Operand spillSlot() const; michael@0: Operand toOperand(const MoveOperand &operand, bool isFloat) const; michael@0: michael@0: void emitMove(const MoveOperand &from, const MoveOperand &to); michael@0: void emitFloat32Move(const MoveOperand &from, const MoveOperand &to); michael@0: void emitDoubleMove(const MoveOperand &from, const MoveOperand &to); michael@0: void breakCycle(const MoveOperand &from, const MoveOperand &to, MoveOp::Type type); michael@0: void completeCycle(const MoveOperand &from, const MoveOperand &to, MoveOp::Type type); michael@0: void emit(const MoveOp &move); michael@0: michael@0: public: michael@0: MoveEmitterARM(MacroAssemblerARMCompat &masm); michael@0: ~MoveEmitterARM(); michael@0: void emit(const MoveResolver &moves); michael@0: void finish(); michael@0: }; michael@0: michael@0: typedef MoveEmitterARM MoveEmitter; michael@0: michael@0: } // namespace jit michael@0: } // namespace js michael@0: michael@0: #endif /* jit_arm_MoveEmitter_arm_h */