LLVM  10.0.0svn
Macros | Typedefs | Functions
WebAssemblyDisassembler.cpp File Reference

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

#include "MCTargetDesc/WebAssemblyInstPrinter.h"
#include "MCTargetDesc/WebAssemblyMCTargetDesc.h"
#include "TargetInfo/WebAssemblyTargetInfo.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/MC/MCSymbolWasm.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)
 
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

◆ LLVMInitializeWebAssemblyDisassembler()

void LLVMInitializeWebAssemblyDisassembler ( )

◆ nextByte()

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

Definition at line 77 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 
)
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