15 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_MCTARGETDESC_WEBASSEMBLYMCTARGETDESC_H
16 #define LLVM_LIB_TARGET_WEBASSEMBLY_MCTARGETDESC_WEBASSEMBLYMCTARGETDESC_H
20 #include "llvm/Support/DataTypes.h"
29 class MCSubtargetInfo;
33 class raw_pwrite_stream;
43 bool Is64Bit, uint8_t OSABI);
48 namespace WebAssembly {
77 namespace WebAssemblyII {
93 #define GET_REGINFO_ENUM
94 #include "WebAssemblyGenRegisterInfo.inc"
98 #define GET_INSTRINFO_ENUM
99 #include "WebAssemblyGenInstrInfo.inc"
101 #define GET_SUBTARGETINFO_ENUM
102 #include "WebAssemblyGenSubtargetInfo.inc"
105 namespace WebAssembly {
110 case WebAssembly::LOAD8_S_I32:
111 case WebAssembly::LOAD8_U_I32:
112 case WebAssembly::LOAD8_S_I64:
113 case WebAssembly::LOAD8_U_I64:
114 case WebAssembly::STORE8_I32:
115 case WebAssembly::STORE8_I64:
117 case WebAssembly::LOAD16_S_I32:
118 case WebAssembly::LOAD16_U_I32:
119 case WebAssembly::LOAD16_S_I64:
120 case WebAssembly::LOAD16_U_I64:
121 case WebAssembly::STORE16_I32:
122 case WebAssembly::STORE16_I64:
124 case WebAssembly::LOAD_I32:
125 case WebAssembly::LOAD_F32:
126 case WebAssembly::STORE_I32:
127 case WebAssembly::STORE_F32:
128 case WebAssembly::LOAD32_S_I64:
129 case WebAssembly::LOAD32_U_I64:
130 case WebAssembly::STORE32_I64:
132 case WebAssembly::LOAD_I64:
133 case WebAssembly::LOAD_F64:
134 case WebAssembly::STORE_I64:
135 case WebAssembly::STORE_F64:
167 static const unsigned Nop = 0x01;
168 static const unsigned End = 0x0b;
static const unsigned LoadP2AlignOperandNo
The operand number of the load or store p2align in load/store instructions.
32-bit floating-point immediates.
static const unsigned LoadAddressOperandNo
The operand number of the load or store address in load/store instructions.
MCObjectWriter * createWebAssemblyWasmObjectWriter(raw_pwrite_stream &OS, bool Is64Bit)
32-bit integer immediates.
32-bit unsigned memory offsets.
Basic block label in a branch construct.
static const unsigned StoreP2AlignOperandNo
signature immediate for block/loop.
ExprType
This is used to indicate block signatures.
wasm::ValType toValType(const MVT &Ty)
64-bit integer immediates.
MCCodeEmitter * createWebAssemblyMCCodeEmitter(const MCInstrInfo &MCII)
static const unsigned End
unsigned GetDefaultP2Align(unsigned Opcode)
Return the default p2align value for a load or store with the given opcode.
type signature immediate for call_indirect.
static const char * Target
MCAsmBackend * createWebAssemblyAsmBackend(const Triple &TT)
MCObjectWriter * createWebAssemblyELFObjectWriter(raw_pwrite_stream &OS, bool Is64Bit, uint8_t OSABI)
static const unsigned StoreAddressOperandNo
64-bit floating-point immediates.
32-bit unsigned function indices.
llvm_unreachable("Unknown RegBank!")
p2align immediate for load and store address alignment.
static const unsigned Nop
Instruction opcodes emitted via means other than CodeGen.
Target & getTheWebAssemblyTarget32()
Target & getTheWebAssemblyTarget64()