/freebsd/contrib/llvm-project/llvm/include/llvm/BinaryFormat/ |
H A D | WasmTraits.h | 22 template <> struct DenseMapInfo<wasm::WasmSignature, void> { 23 static wasm::WasmSignature getEmptyKey() { 24 wasm::WasmSignature Sig; 25 Sig.State = wasm::WasmSignature::Empty; 28 static wasm::WasmSignature getTombstoneKey() { 29 wasm::WasmSignature Sig; 30 Sig.State = wasm::WasmSignature::Tombstone; 33 static unsigned getHashValue(const wasm::WasmSignature &Sig) { 41 static bool isEqual(const wasm::WasmSignature &LHS, 42 const wasm [all...] |
/freebsd/contrib/llvm-project/llvm/lib/Target/WebAssembly/MCTargetDesc/ |
H A D | WebAssemblyMCTypeUtilities.cpp | 20 std::optional<wasm::ValType> WebAssembly::parseType(StringRef Type) { in parseType() 21 return llvm::StringSwitch<std::optional<wasm::ValType>>{Type} in parseType() 22 .Case("i32", wasm::ValType::I32) in parseType() 23 .Case("i64", wasm::ValType::I64) in parseType() 24 .Case("f32", wasm::ValType::F32) in parseType() 25 .Case("f64", wasm::ValType::F64) in parseType() 27 wasm::ValType::V128) in parseType() 28 .Case("funcref", wasm::ValType::FUNCREF) in parseType() 29 .Case("externref", wasm::ValType::EXTERNREF) in parseType() 30 .Case("exnref", wasm::ValType::EXNREF) in parseType() [all …]
|
H A D | WebAssemblyWasmObjectWriter.cpp | 78 return wasm::R_WASM_GLOBAL_INDEX_LEB; in getRelocType() 81 return is64Bit() ? wasm::R_WASM_TABLE_INDEX_REL_SLEB64 in getRelocType() 82 : wasm::R_WASM_TABLE_INDEX_REL_SLEB; in getRelocType() 84 return is64Bit() ? wasm::R_WASM_MEMORY_ADDR_TLS_SLEB64 in getRelocType() 85 : wasm::R_WASM_MEMORY_ADDR_TLS_SLEB; in getRelocType() 88 return is64Bit() ? wasm::R_WASM_MEMORY_ADDR_REL_SLEB64 in getRelocType() 89 : wasm::R_WASM_MEMORY_ADDR_REL_SLEB; in getRelocType() 91 return wasm::R_WASM_TYPE_INDEX_LEB; in getRelocType() 95 return wasm::R_WASM_FUNCTION_INDEX_I32; in getRelocType() 104 return wasm::R_WASM_TABLE_INDEX_SLEB; in getRelocType() [all …]
|
H A D | WebAssemblyMCTypeUtilities.h | 28 I32 = unsigned(wasm::ValType::I32), 29 I64 = unsigned(wasm::ValType::I64), 30 F32 = unsigned(wasm::ValType::F32), 31 F64 = unsigned(wasm::ValType::F64), 32 V128 = unsigned(wasm::ValType::V128), 33 Externref = unsigned(wasm::ValType::EXTERNREF), 34 Funcref = unsigned(wasm::ValType::FUNCREF), 35 Exnref = unsigned(wasm::ValType::EXNREF), 44 inline bool isRefType(wasm::ValType Type) { in isRefType() 45 return Type == wasm::ValType::EXTERNREF || Type == wasm::ValType::FUNCREF || in isRefType() [all …]
|
H A D | WebAssemblyTargetStreamer.cpp | 30 void WebAssemblyTargetStreamer::emitValueType(wasm::ValType Type) { in emitValueType() 42 ArrayRef<wasm::ValType> Types) { in printTypes() 54 void WebAssemblyTargetAsmStreamer::emitLocal(ArrayRef<wasm::ValType> Types) { in emitLocal() 72 static_cast<wasm::ValType>(Sym->getGlobalType().Type)); in emitGlobalType() 80 const wasm::WasmTableType &Type = Sym->getTableType(); in emitTableType() 82 << WebAssembly::typeToString(static_cast<wasm::ValType>(Type.ElemType)); in emitTableType() 83 bool HasMaximum = Type.Limits.Flags & wasm::WASM_LIMITS_FLAG_HAS_MAX; in emitTableType() 121 void WebAssemblyTargetWasmStreamer::emitLocal(ArrayRef<wasm::ValType> Types) { in emitLocal() 122 SmallVector<std::pair<wasm::ValType, uint32_t>, 4> Grouped; in emitLocal()
|
/freebsd/contrib/llvm-project/llvm/lib/Object/ |
H A D | WasmObjectFile.cpp | 42 << ", Kind=" << toString(wasm::WasmSymbolType(Info.Kind)) << ", Flags=0x" in print() 45 case wasm::WASM_SYMBOL_BINDING_GLOBAL: Out << "global"; break; in print() 46 case wasm::WASM_SYMBOL_BINDING_LOCAL: Out << "local"; break; in print() 47 case wasm::WASM_SYMBOL_BINDING_WEAK: Out << "weak"; break; in print() 178 static wasm::ValType parseValType(WasmObjectFile::ReadContext &Ctx, in parseValType() 183 case wasm::WASM_TYPE_I32: in parseValType() 184 case wasm::WASM_TYPE_I64: in parseValType() 185 case wasm::WASM_TYPE_F32: in parseValType() 186 case wasm::WASM_TYPE_F64: in parseValType() 187 case wasm::WASM_TYPE_V128: in parseValType() [all …]
|
H A D | RelocationResolver.cpp | 692 case wasm::R_WASM_FUNCTION_INDEX_LEB: in supportsWasm32() 693 case wasm::R_WASM_TABLE_INDEX_SLEB: in supportsWasm32() 694 case wasm::R_WASM_TABLE_INDEX_I32: in supportsWasm32() 695 case wasm::R_WASM_MEMORY_ADDR_LEB: in supportsWasm32() 696 case wasm::R_WASM_MEMORY_ADDR_SLEB: in supportsWasm32() 697 case wasm::R_WASM_MEMORY_ADDR_I32: in supportsWasm32() 698 case wasm::R_WASM_TYPE_INDEX_LEB: in supportsWasm32() 699 case wasm::R_WASM_GLOBAL_INDEX_LEB: in supportsWasm32() 700 case wasm::R_WASM_FUNCTION_OFFSET_I32: in supportsWasm32() 701 case wasm in supportsWasm32() [all...] |
/freebsd/contrib/llvm-project/llvm/include/llvm/MC/ |
H A D | MCSymbolWasm.h | 18 std::optional<wasm::WasmSymbolType> Type; 28 wasm::WasmSignature *Signature = nullptr; 29 std::optional<wasm::WasmGlobalType> GlobalType; 30 std::optional<wasm::WasmTableType> TableType; 44 bool isFunction() const { return Type == wasm::WASM_SYMBOL_TYPE_FUNCTION; } in isFunction() 46 bool isData() const { return !Type || Type == wasm::WASM_SYMBOL_TYPE_DATA; } in isData() 47 bool isGlobal() const { return Type == wasm::WASM_SYMBOL_TYPE_GLOBAL; } in isGlobal() 48 bool isTable() const { return Type == wasm::WASM_SYMBOL_TYPE_TABLE; } in isTable() 49 bool isSection() const { return Type == wasm::WASM_SYMBOL_TYPE_SECTION; } in isSection() 50 bool isTag() const { return Type == wasm::WASM_SYMBOL_TYPE_TAG; } in isTag() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/WebAssembly/ |
H A D | WebAssemblyRuntimeLibcallSignatures.cpp | 551 SmallVectorImpl<wasm::ValType> &Rets, in getLibcallSignature() 552 SmallVectorImpl<wasm::ValType> &Params) { in getLibcallSignature() 556 wasm::ValType PtrTy = in getLibcallSignature() 557 Subtarget.hasAddr64() ? wasm::ValType::I64 : wasm::ValType::I32; in getLibcallSignature() 564 Rets.push_back(wasm::ValType::F32); in getLibcallSignature() 565 Params.push_back(wasm::ValType::F32); in getLibcallSignature() 568 Rets.push_back(wasm::ValType::F32); in getLibcallSignature() 569 Params.push_back(wasm::ValType::F64); in getLibcallSignature() 572 Rets.push_back(wasm::ValType::F32); in getLibcallSignature() 573 Params.push_back(wasm::ValType::I32); in getLibcallSignature() [all …]
|
H A D | WebAssemblyAsmPrinter.cpp | 113 static char getInvokeSig(wasm::ValType VT) { in getInvokeSig() 115 case wasm::ValType::I32: in getInvokeSig() 117 case wasm::ValType::I64: in getInvokeSig() 119 case wasm::ValType::F32: in getInvokeSig() 121 case wasm::ValType::F64: in getInvokeSig() 123 case wasm::ValType::V128: in getInvokeSig() 125 case wasm::ValType::FUNCREF: in getInvokeSig() 127 case wasm::ValType::EXTERNREF: in getInvokeSig() 129 case wasm::ValType::EXNREF: in getInvokeSig() 138 static std::string getEmscriptenInvokeSymbolName(wasm::WasmSignature *Sig) { in getEmscriptenInvokeSymbolName() [all …]
|
H A D | WebAssemblyRuntimeLibcallSignatures.h | 29 SmallVectorImpl<wasm::ValType> &Rets, 30 SmallVectorImpl<wasm::ValType> &Params); 33 SmallVectorImpl<wasm::ValType> &Rets, 34 SmallVectorImpl<wasm::ValType> &Params);
|
H A D | WebAssemblyMCInstLower.cpp | 83 WasmSym->setType(wasm::WASM_SYMBOL_TYPE_FUNCTION); in GetGlobalAddressSymbol() 142 SmallVectorImpl<wasm::ValType> &&Returns, in lowerTypeIndexOperand() 143 SmallVectorImpl<wasm::ValType> &&Params) const { in lowerTypeIndexOperand() 150 WasmSym->setType(wasm::WASM_SYMBOL_TYPE_FUNCTION); in lowerTypeIndexOperand() 157 SmallVectorImpl<wasm::ValType> &Returns) { in getFunctionReturns() 198 SmallVector<wasm::ValType, 4> Returns; in lower() 199 SmallVector<wasm::ValType, 4> Params; in lower() 227 SmallVector<wasm::ValType, 1> Returns; in lower() 230 SmallVector<wasm::ValType, 4>()); in lower()
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Object/ |
H A D | Wasm.h | 37 WasmSymbol(const wasm::WasmSymbolInfo &Info, in WasmSymbol() 38 const wasm::WasmGlobalType *GlobalType, in WasmSymbol() 39 const wasm::WasmTableType *TableType, in WasmSymbol() 40 const wasm::WasmSignature *Signature) in WasmSymbol() 43 assert(!Signature || Signature->Kind != wasm::WasmSignature::Placeholder); in WasmSymbol() 48 wasm::WasmSymbolInfo Info; 49 const wasm::WasmGlobalType *GlobalType; 50 const wasm::WasmTableType *TableType; 51 const wasm::WasmSignature *Signature; 54 return Info.Kind == wasm::WASM_SYMBOL_TYPE_FUNCTION; in isTypeFunction() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/MC/ |
H A D | WasmObjectWriter.cpp | 57 // A wasm data segment. A wasm binary contains only a single data section 60 // wasm data segment. 71 // A wasm function to be written into the function section. 77 // A wasm global to be written into the global section. 79 wasm::WasmGlobalType Type; 105 bool hasAddend() const { return wasm::relocTypeHasAddend(Type); } in hasAddend() 108 Out << wasm::relocTypetoString(Type) << " Off=" << Offset in print() 220 DenseMap<const MCSymbolWasm *, wasm::WasmDataReference> DataLocations; 234 DenseMap<wasm [all...] |
/freebsd/contrib/llvm-project/llvm/lib/Target/WebAssembly/AsmParser/ |
H A D | WebAssemblyAsmTypeCheck.cpp | 50 void WebAssemblyAsmTypeCheck::funcDecl(const wasm::WasmSignature &Sig) { in funcDecl() 57 const SmallVectorImpl<wasm::ValType> &Locals) { in localDecl() 86 std::optional<wasm::ValType> EVT) { in popType() 116 wasm::ValType &Type) { in getLocal() 126 checkStackTop(const SmallVectorImpl<wasm::ValType> &ExpectedStackTop, in checkStackTop() 127 const SmallVectorImpl<wasm::ValType> &Got) { in checkStackTop() 142 const SmallVector<wasm::ValType, 4> &Expected = in checkBr() 173 const wasm::WasmSignature &Sig) { in checkSig() 193 wasm::ValType &Type) { in getGlobal() 198 switch (WasmSym->getType().value_or(wasm::WASM_SYMBOL_TYPE_DATA)) { in getGlobal() [all …]
|
H A D | WebAssemblyAsmTypeCheck.h | 31 SmallVector<wasm::ValType, 8> Stack; 32 SmallVector<SmallVector<wasm::ValType, 4>, 8> BrStack; 33 SmallVector<wasm::ValType, 16> LocalTypes; 34 SmallVector<wasm::ValType, 4> ReturnTypes; 35 wasm::WasmSignature LastSig; 42 bool popType(SMLoc ErrorLoc, std::optional<wasm::ValType> EVT); 44 bool getLocal(SMLoc ErrorLoc, const MCInst &Inst, wasm::ValType &Type); 47 bool checkSig(SMLoc ErrorLoc, const wasm::WasmSignature &Sig); 50 bool getGlobal(SMLoc ErrorLoc, const MCInst &Inst, wasm::ValType &Type); 51 bool getTable(SMLoc ErrorLoc, const MCInst &Inst, wasm::ValType &Type); [all …]
|
H A D | WebAssemblyAsmParser.cpp | 176 static wasm::WasmLimits DefaultLimits() { in DefaultLimits() 177 return {wasm::WASM_LIMITS_FLAG_NONE, 0, 0}; in DefaultLimits() 229 wasm::WasmSignature Sig; 308 void push(NestingType NT, wasm::WasmSignature Sig = wasm::WasmSignature()) { in push() 372 bool parseRegTypeList(SmallVectorImpl<wasm::ValType> &Types) { in parseRegTypeList() 472 wasm::WasmSignature Sig({static_cast<wasm::ValType>(BT)}, {}); in addBlockTypeOperand() 481 bool parseLimits(wasm::WasmLimits *Limits) { in parseLimits() 491 Limits->Flags |= wasm::WASM_LIMITS_FLAG_HAS_MAX; in parseLimits() 644 WasmSym->setType(wasm::WASM_SYMBOL_TYPE_FUNCTION); in ParseInstruction() 739 bool parseSignature(wasm::WasmSignature *Signature) { in parseSignature() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/WebAssembly/Utils/ |
H A D | WebAssemblyTypeUtilities.cpp | 40 wasm::ValType WebAssembly::toValType(MVT Type) { in toValType() 43 return wasm::ValType::I32; in toValType() 45 return wasm::ValType::I64; in toValType() 47 return wasm::ValType::F32; in toValType() 49 return wasm::ValType::F64; in toValType() 57 return wasm::ValType::V128; in toValType() 59 return wasm::ValType::FUNCREF; in toValType() 61 return wasm::ValType::EXTERNREF; in toValType() 63 return wasm::ValType::EXNREF; in toValType() 76 wasm::ValType ValTy; in wasmSymbolSetType() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/BinaryFormat/ |
H A D | Wasm.cpp | 11 llvm::StringRef llvm::wasm::toString(wasm::WasmSymbolType Type) { in toString() 13 case wasm::WASM_SYMBOL_TYPE_FUNCTION: in toString() 15 case wasm::WASM_SYMBOL_TYPE_GLOBAL: in toString() 17 case wasm::WASM_SYMBOL_TYPE_TABLE: in toString() 19 case wasm::WASM_SYMBOL_TYPE_DATA: in toString() 21 case wasm::WASM_SYMBOL_TYPE_SECTION: in toString() 23 case wasm::WASM_SYMBOL_TYPE_TAG: in toString() 29 llvm::StringRef llvm::wasm::relocTypetoString(uint32_t Type) { in relocTypetoString() 41 llvm::StringRef llvm::wasm::sectionTypeToString(uint32_t Type) { in sectionTypeToString() 43 case wasm::WASM_SEC_##X: \ in sectionTypeToString() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/ObjectYAML/ |
H A D | WasmYAML.cpp | 176 case wasm::WASM_SEC_CUSTOM: { in mapping() 211 case wasm::WASM_SEC_TYPE: in mapping() 216 case wasm::WASM_SEC_IMPORT: in mapping() 221 case wasm::WASM_SEC_FUNCTION: in mapping() 226 case wasm::WASM_SEC_TABLE: in mapping() 231 case wasm::WASM_SEC_MEMORY: in mapping() 236 case wasm::WASM_SEC_TAG: in mapping() 241 case wasm::WASM_SEC_GLOBAL: in mapping() 246 case wasm::WASM_SEC_EXPORT: in mapping() 251 case wasm::WASM_SEC_START: in mapping() [all …]
|
H A D | WasmEmitter.cpp | 121 if (Lim.Flags & wasm::WASM_LIMITS_FLAG_HAS_MAX) in writeLimits() 138 case wasm::WASM_OPCODE_I32_CONST: in writeInitExpr() 141 case wasm::WASM_OPCODE_I64_CONST: in writeInitExpr() 144 case wasm::WASM_OPCODE_F32_CONST: in writeInitExpr() 147 case wasm::WASM_OPCODE_F64_CONST: in writeInitExpr() 150 case wasm::WASM_OPCODE_GLOBAL_GET: in writeInitExpr() 158 writeUint8(OS, wasm::WASM_OPCODE_END); in writeInitExpr() 166 writeUint8(OS, wasm::WASM_DYLINK_MEM_INFO); in writeSectionContent() 176 writeUint8(OS, wasm::WASM_DYLINK_NEEDED); in writeSectionContent() 194 writeUint8(OS, wasm::WASM_SYMBOL_TABLE); in writeSectionContent() [all …]
|
/freebsd/contrib/llvm-project/lld/include/lld/Common/ |
H A D | LLVM.h | 46 namespace wasm { 89 using llvm::wasm::WasmFunction; 90 using llvm::wasm::WasmGlobal; 91 using llvm::wasm::WasmGlobalType; 92 using llvm::wasm::WasmInitExpr; 93 using llvm::wasm::WasmLimits; 94 using llvm::wasm::WasmRelocation; 95 using llvm::wasm::WasmSignature; 96 using llvm::wasm::WasmTable; 97 using llvm::wasm::WasmTableType; [all …]
|
/freebsd/contrib/llvm-project/llvm/tools/llvm-readobj/ |
H A D | WasmDumper.cpp | 25 { #X, wasm::WASM_SYMBOL_TYPE_##X } 33 { #X, wasm::WASM_SEC_##X } 44 { #X, wasm::WASM_SYMBOL_##X } 88 const wasm::WasmRelocation &WasmReloc = Obj->getWasmRelocation(Reloc); in printRelocation() 95 bool HasAddend = wasm::relocTypeHasAddend(static_cast<uint32_t>(RelocType)); in printRelocation() 163 case wasm::WASM_SEC_CUSTOM: in printSectionHeaders() 166 const wasm::WasmLinkingData &LinkingData = Obj->linkingData(); in printSectionHeaders() 169 for (const wasm::WasmInitFunc &F : LinkingData.InitFunctions) in printSectionHeaders() 174 case wasm::WASM_SEC_DATA: { in printSectionHeaders() 177 const wasm in printSectionHeaders() [all...] |
/freebsd/contrib/llvm-project/llvm/include/llvm/ObjectYAML/ |
H A D | WasmYAML.h | 69 wasm::WasmInitExprMVP Inst; 155 SignatureForm Form = wasm::WASM_TYPE_FUNC; 167 wasm::WasmDataReference DataRef; 197 : Section(wasm::WASM_SEC_CUSTOM), Name(Name) {} in CustomSection() 200 return S->Type == wasm::WASM_SEC_CUSTOM; in classof() 288 TypeSection() : Section(wasm::WASM_SEC_TYPE) {} in TypeSection() 291 return S->Type == wasm::WASM_SEC_TYPE; in classof() 298 ImportSection() : Section(wasm::WASM_SEC_IMPORT) {} in ImportSection() 301 return S->Type == wasm::WASM_SEC_IMPORT; in classof() 308 FunctionSection() : Section(wasm::WASM_SEC_FUNCTION) {} in FunctionSection() [all …]
|
/freebsd/contrib/file/magic/Magdir/ |
H A D | webassembly | 6 # Group at https://webassembly.org/. The file extension is .wasm, and 7 # the MIME type is application/wasm. 13 0 string \0asm WebAssembly (wasm) binary module 15 !:mime application/wasm 16 !:ext wasm
|