LLVM 20.0.0git
Macros | Typedefs | Functions
WebAssemblyDisassembler.cpp File Reference

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

#include "MCTargetDesc/WebAssemblyMCTypeUtilities.h"
#include "TargetInfo/WebAssemblyTargetInfo.h"
#include "llvm/BinaryFormat/Wasm.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDisassembler/MCDisassembler.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstrInfo.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/MC/MCSymbolWasm.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/LEB128.h"
#include "WebAssemblyGenDisassemblerTables.inc"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "wasm-disassembler"
 

Typedefs

using DecodeStatus = MCDisassembler::DecodeStatus
 

Functions

static MCDisassemblercreateWebAssemblyDisassembler (const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx)
 
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)
 

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 34 of file WebAssemblyDisassembler.cpp.

Typedef Documentation

◆ DecodeStatus

Definition at line 36 of file WebAssemblyDisassembler.cpp.

Function Documentation

◆ createWebAssemblyDisassembler()

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

Definition at line 61 of file WebAssemblyDisassembler.cpp.

Referenced by LLVMInitializeWebAssemblyDisassembler().

◆ LLVMInitializeWebAssemblyDisassembler()

LLVM_EXTERNAL_VISIBILITY void LLVMInitializeWebAssemblyDisassembler ( )

◆ nextByte()

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

Definition at line 77 of file WebAssemblyDisassembler.cpp.

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

Referenced by readPrefixes().

◆ nextLEB()

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

◆ parseImmediate()

template<typename T >
bool parseImmediate ( MCInst MI,
uint64_t Size,
ArrayRef< uint8_t Bytes 
)

◆ parseLEBImmediate()

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

Definition at line 100 of file WebAssemblyDisassembler.cpp.

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