1 //==- WebAssemblyMCTargetDesc.h - WebAssembly Target Descriptions -*- C++ -*-=//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 /// \brief This file provides WebAssembly-specific target descriptions.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_MCTARGETDESC_WEBASSEMBLYMCTARGETDESC_H
16 #define LLVM_LIB_TARGET_WEBASSEMBLY_MCTARGETDESC_WEBASSEMBLYMCTARGETDESC_H
18 #include "llvm/Support/DataTypes.h"
27 class MCSubtargetInfo;
30 class raw_pwrite_stream;
32 extern Target TheWebAssemblyTarget32;
33 extern Target TheWebAssemblyTarget64;
35 MCCodeEmitter *createWebAssemblyMCCodeEmitter(const MCInstrInfo &MCII,
38 MCAsmBackend *createWebAssemblyAsmBackend(const Triple &TT);
40 MCObjectWriter *createWebAssemblyELFObjectWriter(raw_pwrite_stream &OS,
41 bool Is64Bit, uint8_t OSABI);
43 } // end namespace llvm
45 // Defines symbolic names for WebAssembly registers. This defines a mapping from
46 // register name to register number.
48 #define GET_REGINFO_ENUM
49 #include "WebAssemblyGenRegisterInfo.inc"
51 // Defines symbolic names for the WebAssembly instructions.
53 #define GET_INSTRINFO_ENUM
54 #include "WebAssemblyGenInstrInfo.inc"
56 #define GET_SUBTARGETINFO_ENUM
57 #include "WebAssemblyGenSubtargetInfo.inc"
59 namespace WebAssemblyII {
61 // For variadic instructions, this flag indicates whether an operand
62 // in the variable_ops range is an immediate value.
63 VariableOpIsImmediate = (1 << 0),
64 // For immediate values in the variable_ops range, this flag indicates
65 // whether the value represents a type.
66 VariableOpImmediateIsType = (1 << 1),
68 } // end namespace WebAssemblyII