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_x86_shared_Lowering_x86_shared_h 8 #define jit_x86_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: LIRGeneratorX86Shared(MIRGenerator * gen,MIRGraph & graph,LIRGraph & lirGraph)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 void visitGuardShape(MGuardShape* ins); 27 void visitGuardObjectGroup(MGuardObjectGroup* ins); 28 void visitPowHalf(MPowHalf* ins); 29 void lowerForShift(LInstructionHelper<1, 2, 0>* ins, MDefinition* mir, MDefinition* lhs, 30 MDefinition* rhs); 31 void lowerForALU(LInstructionHelper<1, 1, 0>* ins, MDefinition* mir, MDefinition* input); 32 void lowerForALU(LInstructionHelper<1, 2, 0>* ins, MDefinition* mir, MDefinition* lhs, 33 MDefinition* rhs); 34 template<size_t Temps> 35 void lowerForFPU(LInstructionHelper<1, 2, Temps>* ins, MDefinition* mir, MDefinition* lhs, 36 MDefinition* rhs); 37 void lowerForCompIx4(LSimdBinaryCompIx4* ins, MSimdBinaryComp* mir, 38 MDefinition* lhs, MDefinition* rhs); 39 void lowerForCompFx4(LSimdBinaryCompFx4* ins, MSimdBinaryComp* mir, 40 MDefinition* lhs, MDefinition* rhs); 41 void lowerForBitAndAndBranch(LBitAndAndBranch* baab, MInstruction* mir, 42 MDefinition* lhs, MDefinition* rhs); 43 void visitAsmJSNeg(MAsmJSNeg* ins); 44 void lowerMulI(MMul* mul, MDefinition* lhs, MDefinition* rhs); 45 void lowerDivI(MDiv* div); 46 void lowerModI(MMod* mod); 47 void lowerUDiv(MDiv* div); 48 void lowerUMod(MMod* mod); 49 void lowerUrshD(MUrsh* mir); 50 void lowerTruncateDToInt32(MTruncateToInt32* ins); 51 void lowerTruncateFToInt32(MTruncateToInt32* ins); 52 void visitSimdBinaryArith(MSimdBinaryArith* ins); 53 void visitSimdSelect(MSimdSelect* ins); 54 void visitSimdSplatX4(MSimdSplatX4* ins); 55 void visitSimdValueX4(MSimdValueX4* ins); 56 void lowerCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins, 57 bool useI386ByteRegisters); 58 void lowerAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins, 59 bool useI386ByteRegisters); 60 void lowerAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins, 61 bool useI386ByteRegisters); 62 }; 63 64 } // namespace jit 65 } // namespace js 66 67 #endif /* jit_x86_shared_Lowering_x86_shared_h */ 68