From bee4ff8454d21644f731703173f449dfeda0fec4 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 2 Jan 2015 18:23:21 -0500 Subject: armemu: Fix missing Q flag check for SMLSD. --- src/core/arm/interpreter/armemu.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/core/arm/interpreter/armemu.cpp') diff --git a/src/core/arm/interpreter/armemu.cpp b/src/core/arm/interpreter/armemu.cpp index 40e4837d8..12166bf79 100644 --- a/src/core/arm/interpreter/armemu.cpp +++ b/src/core/arm/interpreter/armemu.cpp @@ -6480,9 +6480,13 @@ L_stm_s_takeabort: // SMUSD and SMLSD else { state->Reg[rd_idx] = product1 - product2; - - if (BITS(12, 15) != 15) + + if (BITS(12, 15) != 15) { state->Reg[rd_idx] += state->Reg[ra_idx]; + + if (ARMul_AddOverflowQ(product1 - product2, state->Reg[ra_idx])) + SETQ; + } } return 1; -- cgit v1.2.3