1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit/arm/MoveEmitter-arm.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,64 @@ 1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 1.5 + * vim: set ts=8 sts=4 et sw=4 tw=99: 1.6 + * This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +#ifndef jit_arm_MoveEmitter_arm_h 1.11 +#define jit_arm_MoveEmitter_arm_h 1.12 + 1.13 +#include "jit/IonMacroAssembler.h" 1.14 +#include "jit/MoveResolver.h" 1.15 + 1.16 +namespace js { 1.17 +namespace jit { 1.18 + 1.19 +class CodeGenerator; 1.20 + 1.21 +class MoveEmitterARM 1.22 +{ 1.23 + bool inCycle_; 1.24 + MacroAssemblerARMCompat &masm; 1.25 + 1.26 + // Original stack push value. 1.27 + uint32_t pushedAtStart_; 1.28 + 1.29 + // These store stack offsets to spill locations, snapshotting 1.30 + // codegen->framePushed_ at the time they were allocated. They are -1 if no 1.31 + // stack space has been allocated for that particular spill. 1.32 + int32_t pushedAtCycle_; 1.33 + int32_t pushedAtSpill_; 1.34 + 1.35 + // These are registers that are available for temporary use. They may be 1.36 + // assigned InvalidReg. If no corresponding spill space has been assigned, 1.37 + // then these registers do not need to be spilled. 1.38 + Register spilledReg_; 1.39 + FloatRegister spilledFloatReg_; 1.40 + 1.41 + void assertDone(); 1.42 + Register tempReg(); 1.43 + FloatRegister tempFloatReg(); 1.44 + Operand cycleSlot() const; 1.45 + Operand spillSlot() const; 1.46 + Operand toOperand(const MoveOperand &operand, bool isFloat) const; 1.47 + 1.48 + void emitMove(const MoveOperand &from, const MoveOperand &to); 1.49 + void emitFloat32Move(const MoveOperand &from, const MoveOperand &to); 1.50 + void emitDoubleMove(const MoveOperand &from, const MoveOperand &to); 1.51 + void breakCycle(const MoveOperand &from, const MoveOperand &to, MoveOp::Type type); 1.52 + void completeCycle(const MoveOperand &from, const MoveOperand &to, MoveOp::Type type); 1.53 + void emit(const MoveOp &move); 1.54 + 1.55 + public: 1.56 + MoveEmitterARM(MacroAssemblerARMCompat &masm); 1.57 + ~MoveEmitterARM(); 1.58 + void emit(const MoveResolver &moves); 1.59 + void finish(); 1.60 +}; 1.61 + 1.62 +typedef MoveEmitterARM MoveEmitter; 1.63 + 1.64 +} // namespace jit 1.65 +} // namespace js 1.66 + 1.67 +#endif /* jit_arm_MoveEmitter_arm_h */