LLVM  8.0.1
Macros | Typedefs | Functions
WebAssemblyDisassembler.cpp File Reference

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

#include "MCTargetDesc/WebAssemblyMCTargetDesc.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDisassembler/MCDisassembler.h"
#include "llvm/MC/MCFixedLenDisassembler.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstrInfo.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/LEB128.h"
#include "llvm/Support/TargetRegistry.h"
#include "WebAssemblyGenDisassemblerTables.inc"
Include dependency graph for WebAssemblyDisassembler.cpp:

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)
 
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=false)
 
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 32 of file WebAssemblyDisassembler.cpp.

Typedef Documentation

◆ DecodeStatus

Definition at line 34 of file WebAssemblyDisassembler.cpp.

Function Documentation

◆ createWebAssemblyDisassembler()

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

◆ LLVMInitializeWebAssemblyDisassembler()

void LLVMInitializeWebAssemblyDisassembler ( )

◆ nextByte()

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

Definition at line 71 of file WebAssemblyDisassembler.cpp.

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

Referenced by parseImmediate(), readPrefixes(), and setPrefixPresent().

◆ nextLEB()

static bool nextLEB ( int64_t &  Val,
ArrayRef< uint8_t >  Bytes,
uint64_t &  Size,
bool  Signed = false 
)
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