Merge pull request #5864 from MerryMage/is-thumb

arm_dynarmic_32: Print out CPSR.T on exception
This commit is contained in:
LC 2021-02-01 13:36:55 -05:00 committed by GitHub
commit 5e49b81d4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -71,8 +71,9 @@ public:
} }
void ExceptionRaised(u32 pc, Dynarmic::A32::Exception exception) override { void ExceptionRaised(u32 pc, Dynarmic::A32::Exception exception) override {
LOG_CRITICAL(Core_ARM, "ExceptionRaised(exception = {}, pc = {:08X}, code = {:08X})", LOG_CRITICAL(Core_ARM,
exception, pc, MemoryReadCode(pc)); "ExceptionRaised(exception = {}, pc = {:08X}, code = {:08X}, thumb = {})",
exception, pc, MemoryReadCode(pc), parent.IsInThumbMode());
UNIMPLEMENTED(); UNIMPLEMENTED();
} }

View file

@ -50,6 +50,10 @@ public:
u64 GetTPIDR_EL0() const override; u64 GetTPIDR_EL0() const override;
void ChangeProcessorID(std::size_t new_core_id) override; void ChangeProcessorID(std::size_t new_core_id) override;
bool IsInThumbMode() const {
return (GetPSTATE() & 0x20) != 0;
}
void SaveContext(ThreadContext32& ctx) override; void SaveContext(ThreadContext32& ctx) override;
void SaveContext(ThreadContext64& ctx) override {} void SaveContext(ThreadContext64& ctx) override {}
void LoadContext(const ThreadContext32& ctx) override; void LoadContext(const ThreadContext32& ctx) override;