js/src/jit/arm/MoveEmitter-arm.h

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:13cb7472b879
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 * vim: set ts=8 sts=4 et sw=4 tw=99:
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7 #ifndef jit_arm_MoveEmitter_arm_h
8 #define jit_arm_MoveEmitter_arm_h
9
10 #include "jit/IonMacroAssembler.h"
11 #include "jit/MoveResolver.h"
12
13 namespace js {
14 namespace jit {
15
16 class CodeGenerator;
17
18 class MoveEmitterARM
19 {
20 bool inCycle_;
21 MacroAssemblerARMCompat &masm;
22
23 // Original stack push value.
24 uint32_t pushedAtStart_;
25
26 // These store stack offsets to spill locations, snapshotting
27 // codegen->framePushed_ at the time they were allocated. They are -1 if no
28 // stack space has been allocated for that particular spill.
29 int32_t pushedAtCycle_;
30 int32_t pushedAtSpill_;
31
32 // These are registers that are available for temporary use. They may be
33 // assigned InvalidReg. If no corresponding spill space has been assigned,
34 // then these registers do not need to be spilled.
35 Register spilledReg_;
36 FloatRegister spilledFloatReg_;
37
38 void assertDone();
39 Register tempReg();
40 FloatRegister tempFloatReg();
41 Operand cycleSlot() const;
42 Operand spillSlot() const;
43 Operand toOperand(const MoveOperand &operand, bool isFloat) const;
44
45 void emitMove(const MoveOperand &from, const MoveOperand &to);
46 void emitFloat32Move(const MoveOperand &from, const MoveOperand &to);
47 void emitDoubleMove(const MoveOperand &from, const MoveOperand &to);
48 void breakCycle(const MoveOperand &from, const MoveOperand &to, MoveOp::Type type);
49 void completeCycle(const MoveOperand &from, const MoveOperand &to, MoveOp::Type type);
50 void emit(const MoveOp &move);
51
52 public:
53 MoveEmitterARM(MacroAssemblerARMCompat &masm);
54 ~MoveEmitterARM();
55 void emit(const MoveResolver &moves);
56 void finish();
57 };
58
59 typedef MoveEmitterARM MoveEmitter;
60
61 } // namespace jit
62 } // namespace js
63
64 #endif /* jit_arm_MoveEmitter_arm_h */

mercurial