Debian Codegraph @

js/src/jit/mips-shared/Lowering-mips-shared.h

raw
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * vim: set ts=8 sts=2 et sw=2 tw=80:
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_shared_Lowering_mips_shared_h
8 #define jit_mips_shared_Lowering_mips_shared_h
9
10 #include "jit/shared/Lowering-shared.h"
11
12 namespace js {
13 namespace jit {
14
15 class LIRGeneratorMIPSShared : public LIRGeneratorShared {
16 protected:
17 LIRGeneratorMIPSShared(MIRGenerator* gen, MIRGraph& graph, LIRGraph& lirGraph)
18 : LIRGeneratorShared(gen, graph, lirGraph) {}
19
20 // x86 has constraints on what registers can be formatted for 1-byte
21 // stores and loads; on MIPS all registers are okay.
22 LAllocation useByteOpRegister(MDefinition* mir);
23 LAllocation useByteOpRegisterAtStart(MDefinition* mir);
24 LAllocation useByteOpRegisterOrNonDoubleConstant(MDefinition* mir);
25 LDefinition tempByteOpRegister();
26
27 bool needTempForPostBarrier() { return false; }
28
29 void lowerForShift(LInstructionHelper<1, 2, 0>* ins, MDefinition* mir,
30 MDefinition* lhs, MDefinition* rhs);
31 void lowerUrshD(MUrsh* mir);
32
33 void lowerPowOfTwoI(MPow* mir);
34
35 void lowerForALU(LInstructionHelper<1, 1, 0>* ins, MDefinition* mir,
36 MDefinition* input);
37 void lowerForALU(LInstructionHelper<1, 2, 0>* ins, MDefinition* mir,
38 MDefinition* lhs, MDefinition* rhs);
39
40 void lowerForALUInt64(LInstructionHelper<INT64_PIECES, INT64_PIECES, 0>* ins,
41 MDefinition* mir, MDefinition* input);
42 void lowerForALUInt64(
43 LInstructionHelper<INT64_PIECES, 2 * INT64_PIECES, 0>* ins,
44 MDefinition* mir, MDefinition* lhs, MDefinition* rhs);
45 void lowerForMulInt64(LMulI64* ins, MMul* mir, MDefinition* lhs,
46 MDefinition* rhs);
47 template <class LInstr>
48 void lowerForShiftInt64(LInstr* ins, MDefinition* mir, MDefinition* lhs,
49 MDefinition* rhs);
50
51 void lowerForFPU(LInstructionHelper<1, 1, 0>* ins, MDefinition* mir,
52 MDefinition* src);
53 template <size_t Temps>
54 void lowerForFPU(LInstructionHelper<1, 2, Temps>* ins, MDefinition* mir,
55 MDefinition* lhs, MDefinition* rhs);
56
57 void lowerWasmBuiltinTruncateToInt32(MWasmBuiltinTruncateToInt32* ins);
58 void lowerDivI(MDiv* div);
59 void lowerModI(MMod* mod);
60 void lowerNegI(MInstruction* ins, MDefinition* input);
61 void lowerNegI64(MInstruction* ins, MDefinition* input);
62 void lowerMulI(MMul* mul, MDefinition* lhs, MDefinition* rhs);
63 void lowerUDiv(MDiv* div);
64 void lowerUMod(MMod* mod);
65 void lowerWasmSelectI(MWasmSelect* select);
66 void lowerWasmSelectI64(MWasmSelect* select);
67
68 void lowerBigIntPtrLsh(MBigIntPtrLsh* ins);
69 void lowerBigIntPtrRsh(MBigIntPtrRsh* ins);
70 void lowerBigIntPtrDiv(MBigIntPtrDiv* ins);
71 void lowerBigIntPtrMod(MBigIntPtrMod* ins);
72
73 LTableSwitch* newLTableSwitch(const LAllocation& in,
74 const LDefinition& inputCopy);
75 LTableSwitchV* newLTableSwitchV(const LBoxAllocation& in);
76
77 void lowerPhi(MPhi* phi);
78 };
79
80 } // namespace jit
81 } // namespace js
82
83 #endif /* jit_mips_shared_Lowering_mips_shared_h */