michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * vim: set ts=8 sts=4 et sw=4 tw=99: michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef jit_x64_CodeGenerator_x64_h michael@0: #define jit_x64_CodeGenerator_x64_h michael@0: michael@0: #include "jit/shared/CodeGenerator-x86-shared.h" michael@0: michael@0: namespace js { michael@0: namespace jit { michael@0: michael@0: class CodeGeneratorX64 : public CodeGeneratorX86Shared michael@0: { michael@0: CodeGeneratorX64 *thisFromCtor() { michael@0: return this; michael@0: } michael@0: michael@0: protected: michael@0: ValueOperand ToValue(LInstruction *ins, size_t pos); michael@0: ValueOperand ToOutValue(LInstruction *ins); michael@0: ValueOperand ToTempValue(LInstruction *ins, size_t pos); michael@0: michael@0: michael@0: void loadUnboxedValue(Operand source, MIRType type, const LDefinition *dest); michael@0: void storeUnboxedValue(const LAllocation *value, MIRType valueType, michael@0: Operand dest, MIRType slotType); michael@0: michael@0: void storeElementTyped(const LAllocation *value, MIRType valueType, MIRType elementType, michael@0: const Register &elements, const LAllocation *index); michael@0: michael@0: public: michael@0: CodeGeneratorX64(MIRGenerator *gen, LIRGraph *graph, MacroAssembler *masm); michael@0: michael@0: public: michael@0: bool visitValue(LValue *value); michael@0: bool visitBox(LBox *box); michael@0: bool visitUnbox(LUnbox *unbox); michael@0: bool visitLoadSlotV(LLoadSlotV *ins); michael@0: bool visitLoadSlotT(LLoadSlotT *load); michael@0: bool visitStoreSlotT(LStoreSlotT *store); michael@0: bool visitLoadElementT(LLoadElementT *load); michael@0: bool visitImplicitThis(LImplicitThis *lir); michael@0: bool visitInterruptCheck(LInterruptCheck *lir); michael@0: bool visitCompareB(LCompareB *lir); michael@0: bool visitCompareBAndBranch(LCompareBAndBranch *lir); michael@0: bool visitCompareV(LCompareV *lir); michael@0: bool visitCompareVAndBranch(LCompareVAndBranch *lir); michael@0: bool visitTruncateDToInt32(LTruncateDToInt32 *ins); michael@0: bool visitTruncateFToInt32(LTruncateFToInt32 *ins); michael@0: bool visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic *ins); michael@0: bool visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic *ins); michael@0: bool visitAsmJSLoadHeap(LAsmJSLoadHeap *ins); michael@0: bool visitAsmJSStoreHeap(LAsmJSStoreHeap *ins); michael@0: bool visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar *ins); michael@0: bool visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar *ins); michael@0: bool visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr *ins); michael@0: bool visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc *ins); michael@0: bool visitAsmJSUInt32ToDouble(LAsmJSUInt32ToDouble *lir); michael@0: bool visitAsmJSUInt32ToFloat32(LAsmJSUInt32ToFloat32 *lir); michael@0: michael@0: void postAsmJSCall(LAsmJSCall *lir) {} michael@0: }; michael@0: michael@0: typedef CodeGeneratorX64 CodeGeneratorSpecific; michael@0: michael@0: } // namespace jit michael@0: } // namespace js michael@0: michael@0: #endif /* jit_x64_CodeGenerator_x64_h */