|
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_shared_Lowering_x86_shared_h |
|
8 #define jit_shared_Lowering_x86_shared_h |
|
9 |
|
10 #include "jit/shared/Lowering-shared.h" |
|
11 |
|
12 namespace js { |
|
13 namespace jit { |
|
14 |
|
15 class LIRGeneratorX86Shared : public LIRGeneratorShared |
|
16 { |
|
17 protected: |
|
18 LIRGeneratorX86Shared(MIRGenerator *gen, MIRGraph &graph, LIRGraph &lirGraph) |
|
19 : LIRGeneratorShared(gen, graph, lirGraph) |
|
20 {} |
|
21 |
|
22 LTableSwitch *newLTableSwitch(const LAllocation &in, const LDefinition &inputCopy, |
|
23 MTableSwitch *ins); |
|
24 LTableSwitchV *newLTableSwitchV(MTableSwitch *ins); |
|
25 |
|
26 bool visitGuardShape(MGuardShape *ins); |
|
27 bool visitGuardObjectType(MGuardObjectType *ins); |
|
28 bool visitPowHalf(MPowHalf *ins); |
|
29 bool lowerForShift(LInstructionHelper<1, 2, 0> *ins, MDefinition *mir, MDefinition *lhs, |
|
30 MDefinition *rhs); |
|
31 bool lowerForALU(LInstructionHelper<1, 1, 0> *ins, MDefinition *mir, MDefinition *input); |
|
32 bool lowerForALU(LInstructionHelper<1, 2, 0> *ins, MDefinition *mir, MDefinition *lhs, |
|
33 MDefinition *rhs); |
|
34 bool lowerForFPU(LInstructionHelper<1, 2, 0> *ins, MDefinition *mir, MDefinition *lhs, |
|
35 MDefinition *rhs); |
|
36 bool lowerForBitAndAndBranch(LBitAndAndBranch *baab, MInstruction *mir, |
|
37 MDefinition *lhs, MDefinition *rhs); |
|
38 bool visitConstant(MConstant *ins); |
|
39 bool visitAsmJSNeg(MAsmJSNeg *ins); |
|
40 bool lowerMulI(MMul *mul, MDefinition *lhs, MDefinition *rhs); |
|
41 bool lowerDivI(MDiv *div); |
|
42 bool lowerModI(MMod *mod); |
|
43 bool lowerUDiv(MDiv *div); |
|
44 bool lowerUMod(MMod *mod); |
|
45 bool lowerUrshD(MUrsh *mir); |
|
46 bool lowerConstantDouble(double d, MInstruction *ins); |
|
47 bool lowerConstantFloat32(float d, MInstruction *ins); |
|
48 bool lowerTruncateDToInt32(MTruncateToInt32 *ins); |
|
49 bool lowerTruncateFToInt32(MTruncateToInt32 *ins); |
|
50 bool visitForkJoinGetSlice(MForkJoinGetSlice *ins); |
|
51 }; |
|
52 |
|
53 } // namespace jit |
|
54 } // namespace js |
|
55 |
|
56 #endif /* jit_shared_Lowering_x86_shared_h */ |