Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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/. */
7 #ifndef jit_mips_MoveEmitter_mips_h
8 #define jit_mips_MoveEmitter_mips_h
10 #include "jit/IonMacroAssembler.h"
11 #include "jit/MoveResolver.h"
13 namespace js {
14 namespace jit {
16 class CodeGenerator;
18 class MoveEmitterMIPS
19 {
20 bool inCycle_;
21 MacroAssemblerMIPSCompat &masm;
23 // Original stack push value.
24 uint32_t pushedAtStart_;
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_;
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_;
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);
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);
52 public:
53 MoveEmitterMIPS(MacroAssemblerMIPSCompat &masm);
54 ~MoveEmitterMIPS();
55 void emit(const MoveResolver &moves);
56 void finish();
57 };
59 typedef MoveEmitterMIPS MoveEmitter;
61 } // namespace jit
62 } // namespace js
64 #endif /* jit_mips_MoveEmitter_mips_h */