9#ifndef LLDB_SOURCE_PLUGINS_INSTRUCTION_RISCV_EMULATEINSTRUCTIONRISCV_H
10#define LLDB_SOURCE_PLUGINS_INSTRUCTION_RISCV_EMULATEINSTRUCTIONRISCV_H
28 return "Emulate instructions for the RISC-V architecture.";
40 llvm_unreachable(
"Fully covered switch above!");
68 uint32_t reg_num)
override;
70 std::optional<lldb::addr_t>
ReadPC();
74 std::optional<DecodeResult>
Decode(uint32_t inst);
78 std::enable_if_t<std::is_integral_v<T>, std::optional<T>>
90 template <
typename T>
bool WriteMem(uint64_t addr, uint64_t value) {
An architecture specification class.
std::optional< DecodeResult > ReadInstructionAt(lldb::addr_t addr)
bool WritePC(lldb::addr_t pc)
EmulateInstructionRISCV(const ArchSpec &arch)
std::optional< RegisterInfo > GetRegisterInfo(lldb::RegisterKind reg_kind, uint32_t reg_num) override
bool SetTargetTriple(const ArchSpec &arch) override
bool SetAccruedExceptions(llvm::APFloatBase::opStatus)
std::optional< uint32_t > m_last_size
Last decoded instruction size estimate.
bool WriteMem(uint64_t addr, uint64_t value)
bool ReadInstruction() override
bool TestEmulation(Stream &out_stream, ArchSpec &arch, OptionValueDictionary *test_data) override
static llvm::StringRef GetPluginNameStatic()
static bool SupportsThisArch(const ArchSpec &arch)
llvm::RoundingMode GetRoundingMode()
std::optional< DecodeResult > Decode(uint32_t inst)
static llvm::StringRef GetPluginDescriptionStatic()
bool SupportsEmulatingInstructionsOfType(InstructionType inst_type) override
bool Execute(DecodeResult inst, bool ignore_cond)
llvm::StringRef GetPluginName() override
std::enable_if_t< std::is_integral_v< T >, std::optional< T > > ReadMem(uint64_t addr)
std::optional< uint32_t > GetLastInstrSize() override
std::optional< lldb::addr_t > ReadPC()
bool EvaluateInstruction(uint32_t options) override
static lldb_private::EmulateInstruction * CreateInstance(const lldb_private::ArchSpec &arch, InstructionType inst_type)
static bool SupportsThisInstructionType(InstructionType inst_type)
DecodeResult m_decoded
Last decoded instruction from m_opcode.
"lldb/Core/EmulateInstruction.h" A class that allows emulation of CPU opcodes.
bool WriteMemoryUnsigned(const Context &context, lldb::addr_t addr, uint64_t uval, size_t uval_byte_size)
uint64_t ReadMemoryUnsigned(const Context &context, lldb::addr_t addr, size_t byte_size, uint64_t fail_value, bool *success_ptr)
A stream class that can stream formatted output to a file.
A class that represents a running process on the host machine.
InstructionType
Instruction types.
@ eInstructionTypePrologueEpilogue
@ eInstructionTypePCModifying
RegisterKind
Register numbering types.