llvm/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h

//==- WebAssemblyMCTargetDesc.h - WebAssembly Target Descriptions -*- C++ -*-=//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
///
/// \file
/// This file provides WebAssembly-specific target descriptions.
///
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIB_TARGET_WEBASSEMBLY_MCTARGETDESC_WEBASSEMBLYMCTARGETDESC_H
#define LLVM_LIB_TARGET_WEBASSEMBLY_MCTARGETDESC_WEBASSEMBLYMCTARGETDESC_H

#include "llvm/BinaryFormat/Wasm.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCInstrDesc.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/DataTypes.h"
#include <memory>

namespace llvm {

class MCAsmBackend;
class MCCodeEmitter;
class MCInstrInfo;
class MCObjectTargetWriter;
class Triple;

MCCodeEmitter *createWebAssemblyMCCodeEmitter(const MCInstrInfo &MCII,
                                              MCContext &Ctx);

MCAsmBackend *createWebAssemblyAsmBackend(const Triple &TT);

std::unique_ptr<MCObjectTargetWriter>
createWebAssemblyWasmObjectWriter(bool Is64Bit, bool IsEmscripten);

namespace WebAssembly {

// Exception handling / setjmp-longjmp handling command-line options
extern cl::opt<bool> WasmEnableEmEH;   // asm.js-style EH
extern cl::opt<bool> WasmEnableEmSjLj; // asm.js-style SjLJ
extern cl::opt<bool> WasmEnableEH;     // EH using Wasm EH instructions
extern cl::opt<bool> WasmEnableSjLj;   // SjLj using Wasm EH instructions
extern cl::opt<bool> WasmEnableExnref; // EH using new Wasm EH (exnref)

enum OperandType {};
} // end namespace WebAssembly

namespace WebAssemblyII {

/// Target Operand Flag enum.
enum TOF {};

} // end namespace WebAssemblyII

} // end namespace llvm

// Defines symbolic names for WebAssembly registers. This defines a mapping from
// register name to register number.
//
#define GET_REGINFO_ENUM
#include "WebAssemblyGenRegisterInfo.inc"

// Defines symbolic names for the WebAssembly instructions.
//
#define GET_INSTRINFO_ENUM
#define GET_INSTRINFO_MC_HELPER_DECLS
#include "WebAssemblyGenInstrInfo.inc"

namespace llvm {
namespace WebAssembly {

/// Instruction opcodes emitted via means other than CodeGen.
static const unsigned Nop =;
static const unsigned End =;

/// Return the default p2align value for a load or store with the given opcode.
inline unsigned GetDefaultP2AlignAny(unsigned Opc) {}

inline unsigned GetDefaultP2Align(unsigned Opc) {}

inline bool isConst(unsigned Opc) {}

inline bool isScalarConst(unsigned Opc) {}

inline bool isArgument(unsigned Opc) {}

inline bool isCopy(unsigned Opc) {}

inline bool isTee(unsigned Opc) {}

inline bool isCallDirect(unsigned Opc) {}

inline bool isCallIndirect(unsigned Opc) {}

inline bool isBrTable(unsigned Opc) {}

inline bool isMarker(unsigned Opc) {}

inline bool isTry(unsigned Opc) {}

inline bool isCatch(unsigned Opc) {}

inline bool isLocalGet(unsigned Opc) {}

inline bool isLocalSet(unsigned Opc) {}

inline bool isLocalTee(unsigned Opc) {}

static const unsigned UnusedReg =;

// For a given stackified WAReg, return the id number to print with push/pop.
unsigned inline getWARegStackId(unsigned Reg) {}

} // end namespace WebAssembly
} // end namespace llvm

#define GET_SUBTARGETINFO_ENUM
#include "WebAssemblyGenSubtargetInfo.inc"

#endif