LLVM 22.0.0git
WebAssemblyDisassembler.cpp File Reference

This file is part of the WebAssembly Disassembler. More...

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "wasm-disassembler"

Functions

static MCDisassemblercreateWebAssemblyDisassembler (const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx)
LLVM_ABI LLVM_EXTERNAL_VISIBILITY void LLVMInitializeWebAssemblyDisassembler ()
static int nextByte (ArrayRef< uint8_t > Bytes, uint64_t &Size)
static bool nextLEB (int64_t &Val, ArrayRef< uint8_t > Bytes, uint64_t &Size, bool Signed)
static bool parseLEBImmediate (MCInst &MI, uint64_t &Size, ArrayRef< uint8_t > Bytes, bool Signed)
template<typename T>
bool parseImmediate (MCInst &MI, uint64_t &Size, ArrayRef< uint8_t > Bytes)

Variables

static constexpr int WebAssemblyInstructionTableSize = 256

Detailed Description

This file is part of the WebAssembly Disassembler.

It contains code to translate the data produced by the decoder into MCInsts.

Definition in file WebAssemblyDisassembler.cpp.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "wasm-disassembler"

Definition at line 35 of file WebAssemblyDisassembler.cpp.

Function Documentation

◆ createWebAssemblyDisassembler()

MCDisassembler * createWebAssemblyDisassembler ( const Target & T,
const MCSubtargetInfo & STI,
MCContext & Ctx )
static

Definition at line 62 of file WebAssemblyDisassembler.cpp.

References T.

Referenced by LLVMInitializeWebAssemblyDisassembler().

◆ LLVMInitializeWebAssemblyDisassembler()

◆ nextByte()

int nextByte ( ArrayRef< uint8_t > Bytes,
uint64_t & Size )
static

Definition at line 78 of file WebAssemblyDisassembler.cpp.

References Size, and llvm::ArrayRef< T >::size().

Referenced by readPrefixes().

◆ nextLEB()

bool nextLEB ( int64_t & Val,
ArrayRef< uint8_t > Bytes,
uint64_t & Size,
bool Signed )
static

◆ parseImmediate()

◆ parseLEBImmediate()

bool parseLEBImmediate ( MCInst & MI,
uint64_t & Size,
ArrayRef< uint8_t > Bytes,
bool Signed )
static

Definition at line 101 of file WebAssemblyDisassembler.cpp.

References llvm::MCOperand::createImm(), MI, nextLEB(), Signed, and Size.

Variable Documentation

◆ WebAssemblyInstructionTableSize

int WebAssemblyInstructionTableSize = 256
staticconstexpr

Definition at line 41 of file WebAssemblyDisassembler.cpp.