Index: source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h =================================================================== --- source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h +++ source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h @@ -265,30 +265,45 @@ static Opcode* GetOpcodeForInstruction (const uint32_t opcode); + uint32_t + GetFramePointerRegisterNumber() const; + + bool + BranchTo (const Context &context, uint32_t N, lldb::addr_t target); + + bool + ConditionHolds (const uint32_t cond, bool *is_conditional = nullptr); + + bool + UsingAArch32 (); + bool Emulate_addsub_imm (const uint32_t opcode); - -// bool -// Emulate_STP_Q_ldstpair_off (const uint32_t opcode); -// -// bool -// Emulate_STP_S_ldstpair_off (const uint32_t opcode); -// -// bool -// Emulate_STP_32_ldstpair_off (const uint32_t opcode); -// -// bool -// Emulate_STP_D_ldstpair_off (const uint32_t opcode); -// + bool Emulate_ldstpair_off (const uint32_t opcode); bool Emulate_ldstpair_pre (const uint32_t opcode); - + + bool + Emulate_ldstpair_post (const uint32_t opcode); + bool Emulate_ldstpair (const uint32_t opcode, AddrMode a_mode); + bool + EmulateB (const uint32_t opcode); + + bool + EmulateBcond (const uint32_t opcode); + + bool + EmulateCBZ (const uint32_t opcode); + + bool + EmulateTBZ (const uint32_t opcode); + ProcState m_opcode_pstate; ProcState m_emulated_pstate; // This can get updated by the opcode. bool m_ignore_conditions; Index: source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp =================================================================== --- source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp +++ source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp @@ -236,23 +236,53 @@ { 0xff000000, 0x91000000, No_VFP, &EmulateInstructionARM64::Emulate_addsub_imm, "ADD , , # {, }" }, { 0xff000000, 0xb1000000, No_VFP, &EmulateInstructionARM64::Emulate_addsub_imm, "ADDS , , # {, }" }, - { 0xff000000, 0x51000000, No_VFP, &EmulateInstructionARM64::Emulate_addsub_imm, "SUB , , # {, }" }, { 0xff000000, 0x71000000, No_VFP, &EmulateInstructionARM64::Emulate_addsub_imm, "SUBS , , # {, }" }, { 0xff000000, 0x11000000, No_VFP, &EmulateInstructionARM64::Emulate_addsub_imm, "ADD , , # {, }" }, { 0xff000000, 0x31000000, No_VFP, &EmulateInstructionARM64::Emulate_addsub_imm, "ADDS , , # {, }" }, - - { 0xffc00000, 0x29000000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_off, "STP , , [{, #}]" }, - { 0xffc00000, 0xa9000000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_off, "STP , , [{, #}]" }, - { 0xffc00000, 0x2d000000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_off, "STP , , [{, #}]" }, - { 0xffc00000, 0x6d000000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_off, "STP
, , [{, #}]" }, - { 0xffc00000, 0xad000000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_off, "STP , , [{, #}]" }, - - { 0xffc00000, 0xad800000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_pre, "STP , , [, #]!" }, - { 0xffc00000, 0x2d800000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_pre, "STP , , [, #]!" }, - { 0xffc00000, 0x29800000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_pre, "STP , , [, #]!" }, - { 0xffc00000, 0x6d800000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_pre, "STP
, , [, #]!" }, - { 0xffc00000, 0xa9800000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_pre, "STP , , [, #]!" }, + + { 0xffc00000, 0x29000000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_off, "STP , , [{, #}]" }, + { 0xffc00000, 0xa9000000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_off, "STP , , [{, #}]" }, + { 0xffc00000, 0x2d000000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_off, "STP , , [{, #}]" }, + { 0xffc00000, 0x6d000000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_off, "STP
, , [{, #}]" }, + { 0xffc00000, 0xad000000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_off, "STP , , [{, #}]" }, + + { 0xffc00000, 0x29800000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_pre, "STP , , [, #]!" }, + { 0xffc00000, 0xa9800000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_pre, "STP , , [, #]!" }, + { 0xffc00000, 0x2d800000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_pre, "STP , , [, #]!" }, + { 0xffc00000, 0x6d800000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_pre, "STP
, , [, #]!" }, + { 0xffc00000, 0xad800000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_pre, "STP , , [, #]!" }, + + { 0xffc00000, 0x28800000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_post, "STP , , [, #]!" }, + { 0xffc00000, 0xa8800000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_post, "STP , , [, #]!" }, + { 0xffc00000, 0x2c800000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_post, "STP , , [, #]!" }, + { 0xffc00000, 0x6c800000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_post, "STP
, , [, #]!" }, + { 0xffc00000, 0xac800000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_post, "STP , , [, #]!" }, + + { 0xffc00000, 0x29400000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_off, "LDP , , [{, #}]" }, + { 0xffc00000, 0xa9400000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_off, "LDP , , [{, #}]" }, + { 0xffc00000, 0x2d400000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_off, "LDP , , [{, #}]" }, + { 0xffc00000, 0x6d400000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_off, "LDP
, , [{, #}]" }, + { 0xffc00000, 0xad400000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_off, "LDP , , [{, #}]" }, + + { 0xffc00000, 0x29c00000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_pre, "LDP , , [, #]!" }, + { 0xffc00000, 0xa9c00000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_pre, "LDP , , [, #]!" }, + { 0xffc00000, 0x2dc00000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_pre, "LDP , , [, #]!" }, + { 0xffc00000, 0x6dc00000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_pre, "LDP
, , [, #]!" }, + { 0xffc00000, 0xadc00000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_pre, "LDP , , [, #]!" }, + + { 0xffc00000, 0x28c00000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_post, "LDP , , [, #]!" }, + { 0xffc00000, 0xa8c00000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_post, "LDP , , [, #]!" }, + { 0xffc00000, 0x2cc00000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_post, "LDP , , [, #]!" }, + { 0xffc00000, 0x6cc00000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_post, "LDP
, , [, #]!" }, + { 0xffc00000, 0xacc00000, No_VFP, &EmulateInstructionARM64::Emulate_ldstpair_post, "LDP , , [, #]!" }, + + { 0xfc000000, 0x14000000, No_VFP, &EmulateInstructionARM64::EmulateB, "B