summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/arm/interpreter/armemu.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/core/arm/interpreter/armemu.cpp b/src/core/arm/interpreter/armemu.cpp
index c0406943e..b21d97e12 100644
--- a/src/core/arm/interpreter/armemu.cpp
+++ b/src/core/arm/interpreter/armemu.cpp
@@ -6327,11 +6327,14 @@ L_stm_s_takeabort:
6327 } 6327 }
6328 case 0x70: 6328 case 0x70:
6329 // ichfly 6329 // ichfly
6330 // SMUAD, SMUSD, SMLAD 6330 // SMUAD, SMUSD, SMLAD, and SMLSD
6331 if ((instr & 0xf0d0) == 0xf010 || (instr & 0xf0d0) == 0xf050 || (instr & 0xd0) == 0x10) { 6331 if ((instr & 0xf0d0) == 0xf010 || (instr & 0xf0d0) == 0xf050 ||
6332 (instr & 0xd0) == 0x10 || (instr & 0xd0) == 0x50)
6333 {
6332 const u8 rd_idx = BITS(16, 19); 6334 const u8 rd_idx = BITS(16, 19);
6333 const u8 rn_idx = BITS(0, 3); 6335 const u8 rn_idx = BITS(0, 3);
6334 const u8 rm_idx = BITS(8, 11); 6336 const u8 rm_idx = BITS(8, 11);
6337 const u8 ra_idx = BITS(12, 15);
6335 const bool do_swap = (BIT(5) == 1); 6338 const bool do_swap = (BIT(5) == 1);
6336 6339
6337 u32 rm_val = state->Reg[rm_idx]; 6340 u32 rm_val = state->Reg[rm_idx];
@@ -6354,13 +6357,14 @@ L_stm_s_takeabort:
6354 state->Reg[rd_idx] = (rn_lo * rm_lo) - (rn_hi * rm_hi); 6357 state->Reg[rd_idx] = (rn_lo * rm_lo) - (rn_hi * rm_hi);
6355 } 6358 }
6356 // SMLAD 6359 // SMLAD
6357 else { 6360 else if ((instr & 0xd0) == 0x10) {
6358 const u8 ra_idx = BITS(12, 15);
6359 state->Reg[rd_idx] = (rn_lo * rm_lo) + (rn_hi * rm_hi) + (s32)state->Reg[ra_idx]; 6361 state->Reg[rd_idx] = (rn_lo * rm_lo) + (rn_hi * rm_hi) + (s32)state->Reg[ra_idx];
6360 } 6362 }
6363 // SMLSD
6364 else {
6365 state->Reg[rd_idx] = ((rn_lo * rm_lo) - (rn_hi * rm_hi)) + (s32)state->Reg[ra_idx];
6366 }
6361 return 1; 6367 return 1;
6362 } else {
6363 printf ("Unhandled v6 insn: smlsd\n");
6364 } 6368 }
6365 break; 6369 break;
6366 case 0x74: 6370 case 0x74: