LLVM
8.0.1
|
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"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "wasm-disassembler" |
Typedefs | |
using | DecodeStatus = MCDisassembler::DecodeStatus |
Functions | |
static MCDisassembler * | createWebAssemblyDisassembler (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) |
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.
#define DEBUG_TYPE "wasm-disassembler" |
Definition at line 32 of file WebAssemblyDisassembler.cpp.
Definition at line 34 of file WebAssemblyDisassembler.cpp.
|
static |
Definition at line 56 of file WebAssemblyDisassembler.cpp.
References llvm::Target::createMCInstrInfo().
Referenced by LLVMInitializeWebAssemblyDisassembler().
void LLVMInitializeWebAssemblyDisassembler | ( | ) |
Definition at line 63 of file WebAssemblyDisassembler.cpp.
References createWebAssemblyDisassembler(), llvm::getTheWebAssemblyTarget32(), llvm::getTheWebAssemblyTarget64(), and llvm::TargetRegistry::RegisterMCDisassembler().
|
static |
Definition at line 71 of file WebAssemblyDisassembler.cpp.
References Size, and llvm::ArrayRef< T >::size().
Referenced by parseImmediate(), readPrefixes(), and setPrefixPresent().
|
static |
Definition at line 79 of file WebAssemblyDisassembler.cpp.
References llvm::ArrayRef< T >::data(), llvm::decodeSLEB128(), llvm::decodeULEB128(), llvm::Error, N, Signed, Size, and llvm::ArrayRef< T >::size().
Referenced by parseImmediate(), and parseLEBImmediate().
bool parseImmediate | ( | MCInst & | MI, |
uint64_t & | Size, | ||
ArrayRef< uint8_t > | Bytes | ||
) |
Definition at line 104 of file WebAssemblyDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createFPImm(), llvm::MCOperand::createImm(), llvm::ArrayRef< T >::data(), llvm::MCDisassembler::Fail, I, llvm_unreachable, llvm::Intrinsic::memcpy, MI, nextByte(), nextLEB(), llvm::WebAssembly::OPERAND_BASIC_BLOCK, llvm::WebAssembly::OPERAND_BRLIST, llvm::WebAssembly::OPERAND_F32IMM, llvm::WebAssembly::OPERAND_F64IMM, llvm::WebAssembly::OPERAND_FUNCTION32, llvm::WebAssembly::OPERAND_GLOBAL, llvm::WebAssembly::OPERAND_I32IMM, llvm::WebAssembly::OPERAND_I64IMM, llvm::MCOI::OPERAND_IMMEDIATE, llvm::WebAssembly::OPERAND_LOCAL, llvm::WebAssembly::OPERAND_OFFSET32, llvm::WebAssembly::OPERAND_P2ALIGN, llvm::MCOI::OPERAND_REGISTER, llvm::WebAssembly::OPERAND_SIGNATURE, llvm::WebAssembly::OPERAND_TYPEINDEX, llvm::WebAssembly::OPERAND_VEC_I16IMM, llvm::WebAssembly::OPERAND_VEC_I32IMM, llvm::WebAssembly::OPERAND_VEC_I64IMM, llvm::WebAssembly::OPERAND_VEC_I8IMM, parseLEBImmediate(), llvm::MCInst::setOpcode(), Size, llvm::ArrayRef< T >::size(), llvm::MCDisassembler::Success, and T.
Referenced by convertFPR32ToFPR64(), and shouldBeSls().
|
static |
Definition at line 94 of file WebAssemblyDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), and nextLEB().
Referenced by parseImmediate().