15 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_MCTARGETDESC_WEBASSEMBLYMCTARGETDESC_H
16 #define LLVM_LIB_TARGET_WEBASSEMBLY_MCTARGETDESC_WEBASSEMBLYMCTARGETDESC_H
19 #include "llvm/Support/DataTypes.h"
28 class MCSubtargetInfo;
32 class raw_pwrite_stream;
42 bool Is64Bit, uint8_t OSABI);
44 namespace WebAssembly {
69 namespace WebAssemblyII {
85 #define GET_REGINFO_ENUM
86 #include "WebAssemblyGenRegisterInfo.inc"
90 #define GET_INSTRINFO_ENUM
91 #include "WebAssemblyGenInstrInfo.inc"
93 #define GET_SUBTARGETINFO_ENUM
94 #include "WebAssemblyGenSubtargetInfo.inc"
97 namespace WebAssembly {
102 case WebAssembly::LOAD8_S_I32:
103 case WebAssembly::LOAD8_U_I32:
104 case WebAssembly::LOAD8_S_I64:
105 case WebAssembly::LOAD8_U_I64:
106 case WebAssembly::STORE8_I32:
107 case WebAssembly::STORE8_I64:
109 case WebAssembly::LOAD16_S_I32:
110 case WebAssembly::LOAD16_U_I32:
111 case WebAssembly::LOAD16_S_I64:
112 case WebAssembly::LOAD16_U_I64:
113 case WebAssembly::STORE16_I32:
114 case WebAssembly::STORE16_I64:
116 case WebAssembly::LOAD_I32:
117 case WebAssembly::LOAD_F32:
118 case WebAssembly::STORE_I32:
119 case WebAssembly::STORE_F32:
120 case WebAssembly::LOAD32_S_I64:
121 case WebAssembly::LOAD32_U_I64:
122 case WebAssembly::STORE32_I64:
124 case WebAssembly::LOAD_I64:
125 case WebAssembly::LOAD_F64:
126 case WebAssembly::STORE_I64:
127 case WebAssembly::STORE_F64:
174 static const unsigned Nop = 0x01;
175 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.
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.
ValType toValType(const MVT &Ty)
MVT - Machine Value Type.
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.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
ValType
This is used to indicate local types.
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.
p2align immediate for load and store address alignment.
static const unsigned Nop
Instruction opcodes emitted via means other than CodeGen.
Target & getTheWebAssemblyTarget32()
Target & getTheWebAssemblyTarget64()