summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2014-12-19 09:38:10 -0500
committerGravatar Lioncash2014-12-19 09:53:54 -0500
commit0f3a6a161c05c4e4f96450bb0443cfa90813d7ca (patch)
tree3006c4528fe95018d5a1c45a796f2ce4b4d5c410 /src
parentMerge pull request #302 from purpasmart96/flushshutup (diff)
downloadyuzu-0f3a6a161c05c4e4f96450bb0443cfa90813d7ca.tar.gz
yuzu-0f3a6a161c05c4e4f96450bb0443cfa90813d7ca.tar.xz
yuzu-0f3a6a161c05c4e4f96450bb0443cfa90813d7ca.zip
armemu: Implement SMLSD
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 07d205755..4e11e068f 100644
--- a/src/core/arm/interpreter/armemu.cpp
+++ b/src/core/arm/interpreter/armemu.cpp
@@ -6317,11 +6317,14 @@ L_stm_s_takeabort:
6317 } 6317 }
6318 case 0x70: 6318 case 0x70:
6319 // ichfly 6319 // ichfly
6320 // SMUAD, SMUSD, SMLAD 6320 // SMUAD, SMUSD, SMLAD, and SMLSD
6321 if ((instr & 0xf0d0) == 0xf010 || (instr & 0xf0d0) == 0xf050 || (instr & 0xd0) == 0x10) { 6321 if ((instr & 0xf0d0) == 0xf010 || (instr & 0xf0d0) == 0xf050 ||
6322 (instr & 0xd0) == 0x10 || (instr & 0xd0) == 0x50)
6323 {
6322 const u8 rd_idx = BITS(16, 19); 6324 const u8 rd_idx = BITS(16, 19);
6323 const u8 rn_idx = BITS(0, 3); 6325 const u8 rn_idx = BITS(0, 3);
6324 const u8 rm_idx = BITS(8, 11); 6326 const u8 rm_idx = BITS(8, 11);
6327 const u8 ra_idx = BITS(12, 15);
6325 const bool do_swap = (BIT(5) == 1); 6328 const bool do_swap = (BIT(5) == 1);
6326 6329
6327 u32 rm_val = state->Reg[rm_idx]; 6330 u32 rm_val = state->Reg[rm_idx];
@@ -6344,13 +6347,14 @@ L_stm_s_takeabort:
6344 state->Reg[rd_idx] = (rn_lo * rm_lo) - (rn_hi * rm_hi); 6347 state->Reg[rd_idx] = (rn_lo * rm_lo) - (rn_hi * rm_hi);
6345 } 6348 }
6346 // SMLAD 6349 // SMLAD
6347 else { 6350 else if ((instr & 0xd0) == 0x10) {
6348 const u8 ra_idx = BITS(12, 15);
6349 state->Reg[rd_idx] = (rn_lo * rm_lo) + (rn_hi * rm_hi) + (s32)state->Reg[ra_idx]; 6351 state->Reg[rd_idx] = (rn_lo * rm_lo) + (rn_hi * rm_hi) + (s32)state->Reg[ra_idx];
6350 } 6352 }
6353 // SMLSD
6354 else {
6355 state->Reg[rd_idx] = ((rn_lo * rm_lo) - (rn_hi * rm_hi)) + (s32)state->Reg[ra_idx];
6356 }
6351 return 1; 6357 return 1;
6352 } else {
6353 printf ("Unhandled v6 insn: smlsd\n");
6354 } 6358 }
6355 break; 6359 break;
6356 case 0x74: 6360 case 0x74: