js/src/jit/x64/CodeGenerator-x64.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit/x64/CodeGenerator-x64.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,72 @@
     1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
     1.5 + * vim: set ts=8 sts=4 et sw=4 tw=99:
     1.6 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#ifndef jit_x64_CodeGenerator_x64_h
    1.11 +#define jit_x64_CodeGenerator_x64_h
    1.12 +
    1.13 +#include "jit/shared/CodeGenerator-x86-shared.h"
    1.14 +
    1.15 +namespace js {
    1.16 +namespace jit {
    1.17 +
    1.18 +class CodeGeneratorX64 : public CodeGeneratorX86Shared
    1.19 +{
    1.20 +    CodeGeneratorX64 *thisFromCtor() {
    1.21 +        return this;
    1.22 +    }
    1.23 +
    1.24 +  protected:
    1.25 +    ValueOperand ToValue(LInstruction *ins, size_t pos);
    1.26 +    ValueOperand ToOutValue(LInstruction *ins);
    1.27 +    ValueOperand ToTempValue(LInstruction *ins, size_t pos);
    1.28 +
    1.29 +
    1.30 +    void loadUnboxedValue(Operand source, MIRType type, const LDefinition *dest);
    1.31 +    void storeUnboxedValue(const LAllocation *value, MIRType valueType,
    1.32 +                           Operand dest, MIRType slotType);
    1.33 +
    1.34 +    void storeElementTyped(const LAllocation *value, MIRType valueType, MIRType elementType,
    1.35 +                           const Register &elements, const LAllocation *index);
    1.36 +
    1.37 +  public:
    1.38 +    CodeGeneratorX64(MIRGenerator *gen, LIRGraph *graph, MacroAssembler *masm);
    1.39 +
    1.40 +  public:
    1.41 +    bool visitValue(LValue *value);
    1.42 +    bool visitBox(LBox *box);
    1.43 +    bool visitUnbox(LUnbox *unbox);
    1.44 +    bool visitLoadSlotV(LLoadSlotV *ins);
    1.45 +    bool visitLoadSlotT(LLoadSlotT *load);
    1.46 +    bool visitStoreSlotT(LStoreSlotT *store);
    1.47 +    bool visitLoadElementT(LLoadElementT *load);
    1.48 +    bool visitImplicitThis(LImplicitThis *lir);
    1.49 +    bool visitInterruptCheck(LInterruptCheck *lir);
    1.50 +    bool visitCompareB(LCompareB *lir);
    1.51 +    bool visitCompareBAndBranch(LCompareBAndBranch *lir);
    1.52 +    bool visitCompareV(LCompareV *lir);
    1.53 +    bool visitCompareVAndBranch(LCompareVAndBranch *lir);
    1.54 +    bool visitTruncateDToInt32(LTruncateDToInt32 *ins);
    1.55 +    bool visitTruncateFToInt32(LTruncateFToInt32 *ins);
    1.56 +    bool visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic *ins);
    1.57 +    bool visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic *ins);
    1.58 +    bool visitAsmJSLoadHeap(LAsmJSLoadHeap *ins);
    1.59 +    bool visitAsmJSStoreHeap(LAsmJSStoreHeap *ins);
    1.60 +    bool visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar *ins);
    1.61 +    bool visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar *ins);
    1.62 +    bool visitAsmJSLoadFuncPtr(LAsmJSLoadFuncPtr *ins);
    1.63 +    bool visitAsmJSLoadFFIFunc(LAsmJSLoadFFIFunc *ins);
    1.64 +    bool visitAsmJSUInt32ToDouble(LAsmJSUInt32ToDouble *lir);
    1.65 +    bool visitAsmJSUInt32ToFloat32(LAsmJSUInt32ToFloat32 *lir);
    1.66 +
    1.67 +    void postAsmJSCall(LAsmJSCall *lir) {}
    1.68 +};
    1.69 +
    1.70 +typedef CodeGeneratorX64 CodeGeneratorSpecific;
    1.71 +
    1.72 +} // namespace jit
    1.73 +} // namespace js
    1.74 +
    1.75 +#endif /* jit_x64_CodeGenerator_x64_h */

mercurial