#include <cstdlib>
#include <optional>
#include "EmulateInstructionLoongArch.h"
#include "Plugins/Process/Utility/InstructionUtils.h"
#include "Plugins/Process/Utility/RegisterInfoPOSIX_loongarch64.h"
#include "Plugins/Process/Utility/lldb-loongarch-register-enums.h"
#include "lldb/Core/Address.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Interpreter/OptionValueArray.h"
#include "lldb/Interpreter/OptionValueDictionary.h"
#include "lldb/Symbol/UnwindPlan.h"
#include "lldb/Utility/ArchSpec.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/RegisterValue.h"
#include "lldb/Utility/Stream.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/MathExtras.h"
usingnamespacelldb;
usingnamespacelldb_private;
LLDB_PLUGIN_DEFINE_ADV(EmulateInstructionLoongArch, InstructionLoongArch)
namespace lldb_private {
EmulateInstructionLoongArch::Opcode *
EmulateInstructionLoongArch::GetOpcodeForInstruction(uint32_t inst) { … }
bool EmulateInstructionLoongArch::TestExecute(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EvaluateInstruction(uint32_t options) { … }
bool EmulateInstructionLoongArch::ReadInstruction() { … }
lldb::addr_t EmulateInstructionLoongArch::ReadPC(bool *success) { … }
bool EmulateInstructionLoongArch::WritePC(lldb::addr_t pc) { … }
std::optional<RegisterInfo>
EmulateInstructionLoongArch::GetRegisterInfo(lldb::RegisterKind reg_kind,
uint32_t reg_index) { … }
bool EmulateInstructionLoongArch::SetTargetTriple(const ArchSpec &arch) { … }
bool EmulateInstructionLoongArch::TestEmulation(
Stream &out_stream, ArchSpec &arch, OptionValueDictionary *test_data) { … }
void EmulateInstructionLoongArch::Initialize() { … }
void EmulateInstructionLoongArch::Terminate() { … }
lldb_private::EmulateInstruction *
EmulateInstructionLoongArch::CreateInstance(const ArchSpec &arch,
InstructionType inst_type) { … }
bool EmulateInstructionLoongArch::SupportsThisArch(const ArchSpec &arch) { … }
bool EmulateInstructionLoongArch::EmulateBEQZ(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateBNEZ(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateBCEQZ(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateBCNEZ(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateJIRL(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateB(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateBL(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateBEQ(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateBNE(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateBLT(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateBGE(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateBLTU(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateBGEU(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateNonJMP(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateBEQZ64(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateBNEZ64(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateBCEQZ64(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateBCNEZ64(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateJIRL64(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateB64(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateBL64(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateBEQ64(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateBNE64(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateBLT64(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateBGE64(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateBLTU64(uint32_t inst) { … }
bool EmulateInstructionLoongArch::EmulateBGEU64(uint32_t inst) { … }
}