42 for (
auto Type : Types) {
61 OS <<
"\t.functype\t" <<
Sym->getName() <<
" ";
68 OS <<
"\t.globaltype\t" <<
Sym->getName() <<
", "
71 if (!
Sym->getGlobalType().Mutable)
79 OS <<
"\t.tabletype\t" <<
Sym->getName() <<
", "
82 if (
Type.Limits.Minimum != 0 || HasMaximum) {
83 OS <<
", " <<
Type.Limits.Minimum;
85 OS <<
", " <<
Type.Limits.Maximum;
92 OS <<
"\t.tagtype\t" <<
Sym->getName() <<
" ";
99 OS <<
"\t.import_module\t" <<
Sym->getName() <<
", "
100 << ImportModule <<
'\n';
105 OS <<
"\t.import_name\t" <<
Sym->getName() <<
", "
106 << ImportName <<
'\n';
111 OS <<
"\t.export_name\t" <<
Sym->getName() <<
", "
112 << ExportName <<
'\n';
123 for (
auto Type : Types) {
127 ++Grouped.
back().second;
131 for (
auto Pair : Grouped) {
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file contains the declaration of the WebAssemblyMCAsmInfo class.
This file contains the declaration of the WebAssembly-specific type parsing utility functions.
static void printTypes(formatted_raw_ostream &OS, ArrayRef< wasm::ValType > Types)
This file declares WebAssembly-specific target streamer classes.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
void printExpr(raw_ostream &, const MCExpr &) const
const MCAsmInfo * getAsmInfo() const
Base class for the full range of assembler expressions which are needed for parsing.
Streaming machine code generation interface.
virtual void emitIntValue(uint64_t Value, unsigned Size)
Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers.
unsigned emitULEB128IntValue(uint64_t Value, unsigned PadTo=0)
Special case of EmitULEB128Value that avoids the client having to pass in a MCExpr for constant integ...
Target specific streamer interface.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
void emitIndIdx(const MCExpr *Value) override
.indidx
WebAssemblyTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS)
void emitFunctionType(const MCSymbolWasm *Sym) override
.functype
void emitImportName(const MCSymbolWasm *Sym, StringRef ImportName) override
.import_name
void emitExportName(const MCSymbolWasm *Sym, StringRef ExportName) override
.export_name
void emitGlobalType(const MCSymbolWasm *Sym) override
.globaltype
void emitTableType(const MCSymbolWasm *Sym) override
.tabletype
void emitImportModule(const MCSymbolWasm *Sym, StringRef ImportModule) override
.import_module
void emitLocal(ArrayRef< wasm::ValType > Types) override
.local
void emitTagType(const MCSymbolWasm *Sym) override
.tagtype
WebAssembly-specific streamer interface, to implement support WebAssembly-specific assembly directive...
WebAssemblyTargetStreamer(MCStreamer &S)
void emitValueType(wasm::ValType Type)
void emitIndIdx(const MCExpr *Value) override
.indidx
void emitLocal(ArrayRef< wasm::ValType > Types) override
.local
WebAssemblyTargetWasmStreamer(MCStreamer &S)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
const char * typeToString(wasm::ValType Type)
std::string signatureToString(const wasm::WasmSignature *Sig)
std::string typeListToString(ArrayRef< wasm::ValType > List)
@ WASM_LIMITS_FLAG_HAS_MAX
This is an optimization pass for GlobalISel generic memory operations.
@ First
Helpers to iterate all locations in the MemoryEffectsBase class.