CodeGenerator-x64.h (1433B)
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_x64_CodeGenerator_x64_h 8 #define jit_x64_CodeGenerator_x64_h 9 10 #include "jit/x86-shared/CodeGenerator-x86-shared.h" 11 12 namespace js { 13 namespace jit { 14 15 class OutOfLineTruncate; 16 17 class CodeGeneratorX64 : public CodeGeneratorX86Shared { 18 protected: 19 CodeGeneratorX64(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm, 20 const wasm::CodeMetadata* wasmCodeMeta); 21 22 Operand ToOperand64(const LInt64Allocation& a); 23 24 void emitBigIntPtrDiv(LBigIntPtrDiv* ins, Register dividend, Register divisor, 25 Register output); 26 void emitBigIntPtrMod(LBigIntPtrMod* ins, Register dividend, Register divisor, 27 Register output); 28 29 void wasmStore(const wasm::MemoryAccessDesc& access, const LAllocation* value, 30 Operand dstAddr); 31 template <typename T> 32 void emitWasmLoad(T* ins); 33 template <typename T> 34 void emitWasmStore(T* ins); 35 36 public: 37 void visitOutOfLineTruncate(OutOfLineTruncate* ool); 38 }; 39 40 using CodeGeneratorSpecific = CodeGeneratorX64; 41 42 } // namespace jit 43 } // namespace js 44 45 #endif /* jit_x64_CodeGenerator_x64_h */