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

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:b499aed14c25
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_mips_MoveEmitter_mips_h
8 #define jit_mips_MoveEmitter_mips_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 MoveEmitterMIPS
19 {
20 bool inCycle_;
21 MacroAssemblerMIPSCompat &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 Address cycleSlot() const;
42 int32_t getAdjustedOffset(const MoveOperand &operand);
43 Address getAdjustedAddress(const MoveOperand &operand);
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 MoveEmitterMIPS(MacroAssemblerMIPSCompat &masm);
54 ~MoveEmitterMIPS();
55 void emit(const MoveResolver &moves);
56 void finish();
57 };
58
59 typedef MoveEmitterMIPS MoveEmitter;
60
61 } // namespace jit
62 } // namespace js
63
64 #endif /* jit_mips_MoveEmitter_mips_h */

mercurial