|
LLVM
5.0.0
|
#include "llvm/ADT/ArrayRef.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/StringRef.h"#include "llvm/ADT/Triple.h"#include "llvm/BinaryFormat/Wasm.h"#include "llvm/MC/SubtargetFeature.h"#include "llvm/Object/Binary.h"#include "llvm/Object/Error.h"#include "llvm/Object/ObjectFile.h"#include "llvm/Object/SymbolicFile.h"#include "llvm/Object/Wasm.h"#include "llvm/Support/Endian.h"#include "llvm/Support/Error.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Support/LEB128.h"#include <algorithm>#include <cassert>#include <cstdint>#include <cstring>#include <system_error>#include "llvm/BinaryFormat/WasmRelocs/WebAssembly.def"Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "wasm-object" |
| #define | VARINT7_MAX ((1<<7)-1) |
| #define | VARINT7_MIN (-(1<<7)) |
| #define | VARUINT7_MAX (1<<7) |
| #define | VARUINT1_MAX (1) |
| #define | ECase(X) |
| #define | WASM_RELOC(name, value) |
Functions | |
| static uint8_t | readUint8 (const uint8_t *&Ptr) |
| static uint32_t | readUint32 (const uint8_t *&Ptr) |
| static int32_t | readFloat32 (const uint8_t *&Ptr) |
| static int64_t | readFloat64 (const uint8_t *&Ptr) |
| static uint64_t | readULEB128 (const uint8_t *&Ptr) |
| static StringRef | readString (const uint8_t *&Ptr) |
| static int64_t | readLEB128 (const uint8_t *&Ptr) |
| static uint8_t | readVaruint1 (const uint8_t *&Ptr) |
| static int8_t | readVarint7 (const uint8_t *&Ptr) |
| static uint8_t | readVaruint7 (const uint8_t *&Ptr) |
| static int32_t | readVarint32 (const uint8_t *&Ptr) |
| static uint32_t | readVaruint32 (const uint8_t *&Ptr) |
| static int64_t | readVarint64 (const uint8_t *&Ptr) |
| static uint8_t | readOpcode (const uint8_t *&Ptr) |
| static Error | readInitExpr (wasm::WasmInitExpr &Expr, const uint8_t *&Ptr) |
| static wasm::WasmLimits | readLimits (const uint8_t *&Ptr) |
| static wasm::WasmTable | readTable (const uint8_t *&Ptr) |
| static Error | readSection (WasmSection &Section, const uint8_t *&Ptr, const uint8_t *Start) |
| #define DEBUG_TYPE "wasm-object" |
Definition at line 31 of file WasmObjectFile.cpp.
| #define ECase | ( | X | ) |
Referenced by llvm::object::WasmObjectFile::getSectionName().
| #define VARINT7_MAX ((1<<7)-1) |
Definition at line 46 of file WasmObjectFile.cpp.
| #define VARINT7_MIN (-(1<<7)) |
Definition at line 47 of file WasmObjectFile.cpp.
Referenced by readVarint7().
| #define VARUINT1_MAX (1) |
Definition at line 49 of file WasmObjectFile.cpp.
| #define VARUINT7_MAX (1<<7) |
Definition at line 48 of file WasmObjectFile.cpp.
Referenced by readVaruint7().
| #define WASM_RELOC | ( | name, | |
| value | |||
| ) |
|
static |
Definition at line 59 of file WasmObjectFile.cpp.
Referenced by readInitExpr().
|
static |
Definition at line 66 of file WasmObjectFile.cpp.
Referenced by readInitExpr().
|
static |
Definition at line 132 of file WasmObjectFile.cpp.
References llvm::wasm::WasmInitExpr::Float32, llvm::wasm::WasmInitExpr::Float64, llvm::wasm::WasmInitExpr::Global, llvm::wasm::WasmInitExpr::Int32, llvm::wasm::WasmInitExpr::Int64, llvm::wasm::WasmInitExpr::Opcode, llvm::object::parse_failed, readFloat32(), readFloat64(), readOpcode(), readULEB128(), readVarint32(), readVarint64(), llvm::Error::success(), llvm::wasm::WasmInitExpr::Value, llvm::wasm::WASM_OPCODE_END, llvm::wasm::WASM_OPCODE_F32_CONST, llvm::wasm::WASM_OPCODE_F64_CONST, llvm::wasm::WASM_OPCODE_GET_GLOBAL, llvm::wasm::WASM_OPCODE_I32_CONST, and llvm::wasm::WASM_OPCODE_I64_CONST.
|
static |
Definition at line 87 of file WasmObjectFile.cpp.
References llvm::decodeSLEB128().
Referenced by readVarint32(), readVarint64(), readVarint7(), and readVaruint1().
|
static |
Definition at line 164 of file WasmObjectFile.cpp.
References llvm::wasm::WasmLimits::Flags, llvm::wasm::WasmLimits::Initial, llvm::wasm::WasmLimits::Maximum, readVaruint1(), readVaruint32(), and llvm::wasm::WASM_LIMITS_FLAG_HAS_MAX.
Referenced by readTable().
|
static |
Definition at line 128 of file WasmObjectFile.cpp.
References readUint8().
Referenced by readInitExpr().
|
static |
Definition at line 180 of file WasmObjectFile.cpp.
References llvm::object::parse_failed, Ptr, readVaruint32(), readVaruint7(), llvm::AMDGPU::CodeObject::Kernel::Arg::Key::Size, and llvm::Error::success().
Referenced by llvm::object::WasmObjectFile::WasmObjectFile().
Definition at line 80 of file WasmObjectFile.cpp.
References readULEB128(), and llvm::MCID::Return.
Referenced by llvm::coverage::RawCoverageFilenamesReader::read().
|
static |
Definition at line 173 of file WasmObjectFile.cpp.
References llvm::wasm::WasmTable::ElemType, llvm::wasm::WasmTable::Limits, readLimits(), and readVarint7().
Definition at line 53 of file WasmObjectFile.cpp.
References llvm::support::endian::read32le().
Referenced by llvm::object::WasmObjectFile::WasmObjectFile().
|
static |
Definition at line 51 of file WasmObjectFile.cpp.
Referenced by readOpcode().
|
static |
Definition at line 73 of file WasmObjectFile.cpp.
References llvm::decodeULEB128().
Referenced by llvm::object::MachORebaseEntry::moveNext(), llvm::object::MachOBindEntry::moveNext(), readInitExpr(), llvm::coverage::RawCoverageReader::readIntMax(), llvm::coverage::RawCoverageReader::readSize(), readString(), readVaruint32(), and readVaruint7().
|
static |
Definition at line 112 of file WasmObjectFile.cpp.
References assert(), and readLEB128().
Referenced by readInitExpr().
|
static |
Definition at line 124 of file WasmObjectFile.cpp.
References readLEB128().
Referenced by readInitExpr().
|
static |
Definition at line 100 of file WasmObjectFile.cpp.
References assert(), readLEB128(), and VARINT7_MIN.
Referenced by readTable().
|
static |
Definition at line 94 of file WasmObjectFile.cpp.
References assert(), and readLEB128().
Referenced by readLimits().
Definition at line 118 of file WasmObjectFile.cpp.
References assert(), and readULEB128().
Referenced by readLimits(), and readSection().
|
static |
Definition at line 106 of file WasmObjectFile.cpp.
References assert(), readULEB128(), and VARUINT7_MAX.
Referenced by readSection().
1.8.6