From ce8dcdab1e500e9599c5ae86134c4a33568e9b09 Mon Sep 17 00:00:00 2001 From: sunho Date: Mon, 17 May 2021 23:41:10 +0900 Subject: [PATCH] vita3k: STR n == t preindex writeback is defined in vita cpu --- .../A32/translate/impl/thumb32_store_single_data_item.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dynarmic/frontend/A32/translate/impl/thumb32_store_single_data_item.cpp b/src/dynarmic/frontend/A32/translate/impl/thumb32_store_single_data_item.cpp index 93c383757..23ec89ab0 100644 --- a/src/dynarmic/frontend/A32/translate/impl/thumb32_store_single_data_item.cpp +++ b/src/dynarmic/frontend/A32/translate/impl/thumb32_store_single_data_item.cpp @@ -171,7 +171,8 @@ bool TranslatorVisitor::thumb32_STR_imm_1(Reg n, Reg t, bool P, bool U, Imm<8> i if (n == Reg::PC) { return UndefinedInstruction(); } - if (t == Reg::PC || n == t) { + // VITA3K: n == t preindex writeback is defined in vita cpu + if (t == Reg::PC || (!P && n == t)) { return UnpredictableInstruction(); } return StoreImmediate(*this, n, t, P, U, true, Imm<12>{imm8.ZeroExtend()}, StoreImmWordFn);