9#ifndef LLDB_SOURCE_PLUGINS_INSTRUCTION_ARM_EMULATEINSTRUCTIONARM_H
10#define LLDB_SOURCE_PLUGINS_INSTRUCTION_ARM_EMULATEINSTRUCTIONARM_H
26 bool InitIT(uint32_t bits7_0);
139 uint32_t reg_num)
override;
161 bool affect_execstate);
165 bool BXWritePC(Context &context, uint32_t addr);
169 bool ALUWritePC(Context &context, uint32_t addr);
190 uint32_t
ReadCoreReg(uint32_t regnum,
bool *success);
197 const uint32_t
Rd,
bool setflags,
198 const uint32_t carry = ~0u,
199 const uint32_t overflow = ~0u);
211 bool WriteFlags(Context &context,
const uint32_t result,
212 const uint32_t carry = ~0u,
const uint32_t overflow = ~0u);
216 uint64_t fail_value,
bool *success_ptr) {
253 uint64_t fail_value,
bool *success_ptr) {
301 const uint32_t opcode,
A section + offset based address class.
An architecture specification class.
bool EmulateLDRDRegister(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateRORReg(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSTRRtSP(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSTREX(const uint32_t opcode, const ARMEncoding encoding)
static bool SupportsEmulatingInstructionsOfTypeStatic(InstructionType inst_type)
bool CreateFunctionEntryUnwind(UnwindPlan &unwind_plan) override
bool EmulateIT(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateVSTM(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLSLImm(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSTRBT(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateShiftImm(const uint32_t opcode, const ARMEncoding encoding, ARM_ShifterType shift_type)
bool EmulateLDRBT(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateVLDR(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateTEQImm(const uint32_t opcode, const ARMEncoding encoding)
uint32_t CurrentCond(const uint32_t opcode)
bool EmulateB(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateADDRdSPImm(const uint32_t opcode, const ARMEncoding encoding)
bool WriteCoreReg(Context &context, const uint32_t result, const uint32_t Rd)
bool EmulateLDRSBRegister(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSTRHImmARM(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDRHImmediateARM(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDRDImmediate(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDREXB(const uint32_t opcode, const ARMEncoding encoding)
bool CurrentModeIsPrivileged()
bool EmulateEORImm(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSTRThumb(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateCB(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSTRDReg(const uint32_t opcode, const ARMEncoding encoding)
bool EmulatePLIImmediate(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDRRegister(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSTMDA(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateCMPReg(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDM(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateTB(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDRSHT(const uint32_t opcode, const ARMEncoding encoding)
bool EvaluateInstruction(uint32_t evaluate_options) override
bool EmulateASRImm(const uint32_t opcode, const ARMEncoding encoding)
bool ReadInstruction() override
bool EmulateLDRSBT(const uint32_t opcode, const ARMEncoding encoding)
bool MemAWrite(EmulateInstruction::Context &context, lldb::addr_t address, uint64_t data_val, uint32_t size)
bool EmulateVLD1SingleAll(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateBLXRm(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateCMNImm(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSVC(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateORRReg(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSUBImmARM(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateShiftReg(const uint32_t opcode, const ARMEncoding encoding, ARM_ShifterType shift_type)
bool EmulateSTREXD(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateVLDM(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSTRHRegister(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateRSBReg(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDRHLiteral(const uint32_t opcode, const ARMEncoding encoding)
std::optional< RegisterInfo > GetRegisterInfo(lldb::RegisterKind reg_kind, uint32_t reg_num) override
bool EmulateRORImm(const uint32_t opcode, const ARMEncoding encoding)
uint32_t ReadCoreReg(uint32_t regnum, bool *success)
bool EmulateLDRRtRnImm(const uint32_t opcode, const ARMEncoding encoding)
bool ALUWritePC(Context &context, uint32_t addr)
bool EmulateSTMDB(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSUBImmThumb(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateADCImm(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateBXRm(const uint32_t opcode, const ARMEncoding encoding)
bool EmulatePLIRegister(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSTMIB(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLSLReg(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDRSBLiteral(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDRBImmediate(const uint32_t opcode, const ARMEncoding encoding)
static llvm::StringRef GetPluginDescriptionStatic()
bool EmulateSTRHImmThumb(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDMIB(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDRDLiteral(const uint32_t opcode, const ARMEncoding encoding)
static ARMOpcode * GetARMOpcodeForInstruction(const uint32_t opcode, uint32_t isa_mask)
bool EmulateSTRBReg(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateVLD1Single(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateADDReg(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateORRImm(const uint32_t opcode, const ARMEncoding encoding)
void CPSRWriteByInstr(uint32_t value, uint32_t bytemask, bool affect_execstate)
bool EmulateTEQReg(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateADDSPImm(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateBXJ(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateADDImmThumb(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSTRT(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSBCImm(const uint32_t opcode, const ARMEncoding encoding)
bool LoadWritePC(Context &context, uint32_t addr)
bool EmulateMOVRdImm(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDRHT(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateANDImm(const uint32_t opcode, const ARMEncoding encoding)
uint64_t MemURead(EmulateInstruction::Context &context, lldb::addr_t address, uint32_t size, uint64_t fail_value, bool *success_ptr)
bool EmulateSUBR7IPImm(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSXTH(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSTRHT(const uint32_t opcode, const ARMEncoding encoding)
bool BranchWritePC(const Context &context, uint32_t addr)
bool EmulateLDRT(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateTSTImm(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateVPOP(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateADDSPRm(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDREXD(const uint32_t opcode, const ARMEncoding encoding)
bool MemUWrite(EmulateInstruction::Context &context, lldb::addr_t address, uint64_t data_val, uint32_t size)
bool EmulateSTRBImmARM(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateMVNImm(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateVSTR(const uint32_t opcode, const ARMEncoding encoding)
llvm::StringRef GetPluginName() override
virtual bool SetArchitecture(const ArchSpec &arch)
uint64_t MemARead(EmulateInstruction::Context &context, lldb::addr_t address, uint32_t size, uint64_t fail_value, bool *success_ptr)
bool EmulateMVNReg(const uint32_t opcode, const ARMEncoding encoding)
static ARMOpcode * GetThumbOpcodeForInstruction(const uint32_t opcode, uint32_t isa_mask)
bool EmulateSTREXH(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSBCReg(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateMOVRdRm(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateVPUSH(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateEORReg(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLSRReg(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateNop(const uint32_t opcode, const ARMEncoding encoding)
bool EmulatePOP(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDRSHImmediate(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateMOVRdSP(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSTRDImm(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateBICReg(const uint32_t opcode, const ARMEncoding encoding)
bool WriteFlags(Context &context, const uint32_t result, const uint32_t carry=~0u, const uint32_t overflow=~0u)
bool EmulateRSCImm(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLSRImm(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSTRImmARM(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateUXTH(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateCMNReg(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSTREXB(const uint32_t opcode, const ARMEncoding encoding)
bool TestEmulation(Stream &out_stream, ArchSpec &arch, OptionValueDictionary *test_data) override
bool EmulateADR(const uint32_t opcode, const ARMEncoding encoding)
bool EmulatePUSH(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDRBImmediateARM(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDRHRegister(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDRRtPCRelative(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateASRReg(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDRBLiteral(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateVST1Single(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateADCReg(const uint32_t opcode, const ARMEncoding encoding)
bool SupportsEmulatingInstructionsOfType(InstructionType inst_type) override
bool EmulateSUBSPcLrEtc(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateVST1Multiple(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateRSCReg(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateBXJRm(const uint32_t opcode, const ARMEncoding encoding)
bool BXWritePC(Context &context, uint32_t addr)
bool EmulateMOVLowHigh(const uint32_t opcode, const ARMEncoding encoding)
bool BadMode(uint32_t mode)
bool SetTargetTriple(const ArchSpec &arch) override
bool ConditionPassed(const uint32_t opcode)
bool EmulateSTM(const uint32_t opcode, const ARMEncoding encoding)
static llvm::StringRef GetPluginNameStatic()
uint32_t GetFramePointerDWARFRegisterNumber() const
bool WriteCoreRegOptionalFlags(Context &context, const uint32_t result, const uint32_t Rd, bool setflags, const uint32_t carry=~0u, const uint32_t overflow=~0u)
bool EmulateTSTReg(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDRLiteral(const uint32_t, const ARMEncoding encoding)
bool EmulateLDRImmediateARM(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDREXH(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSUBSPReg(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateADDRegShift(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateADDImmARM(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateRFE(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateMUL(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateCMPImm(const uint32_t opcode, const ARMEncoding encoding)
bool SetInstruction(const Opcode &insn_opcode, const Address &inst_addr, Target *target) override
bool EmulateANDReg(const uint32_t opcode, const ARMEncoding encoding)
uint32_t GetFramePointerRegisterNumber() const
bool EmulateLDRBRegister(const uint32_t opcode, const ARMEncoding encoding)
bool SelectInstrSet(Mode arm_or_thumb)
bool EmulateBICImm(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSUBRegShift(const uint32_t opcode, const ARMEncoding encoding)
static lldb_private::EmulateInstruction * CreateInstance(const lldb_private::ArchSpec &arch, InstructionType inst_type)
bool EmulateRRX(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSUBIPSPImm(const uint32_t opcode, const ARMEncoding encoding)
bool WriteBits32Unknown(int n)
bool EmulateUXTB(const uint32_t opcode, const ARMEncoding encoding)
InstructionCondition GetInstructionCondition() override
bool EmulateLDREX(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSUBSPImm(const uint32_t opcode, const ARMEncoding encoding)
AddWithCarryResult AddWithCarry(uint32_t x, uint32_t y, uint8_t carry_in)
bool EmulateRSBImm(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDRSBImmediate(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDMDA(const uint32_t opcode, const ARMEncoding encoding)
bool EmulatePLDImmediate(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSTRRegister(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateVLD1Multiple(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSTRBThumb(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSXTB(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateSUBReg(const uint32_t opcode, const ARMEncoding encoding)
bool WriteBits32UnknownToMemory(lldb::addr_t address)
bool EmulateLDRSHRegister(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDRSHLiteral(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDRHImmediate(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateLDMDB(const uint32_t opcode, const ARMEncoding encoding)
bool EmulateBLXImmediate(const uint32_t opcode, const ARMEncoding encoding)
EmulateInstructionARM(const ArchSpec &arch)
"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)
uint32_t InstructionCondition
bool InitIT(uint32_t bits7_0)
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.
EmulateInstructionARM::ARMEncoding encoding