mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-11-25 02:02:54 +00:00
armemu: Fix SMUAD, SMUSD, and SMLAD
Wrong values were being multiplied together.
This commit is contained in:
parent
0f9e3baf39
commit
d5bcddb77c
|
@ -6243,16 +6243,16 @@ L_stm_s_takeabort:
|
||||||
|
|
||||||
// SMUAD
|
// SMUAD
|
||||||
if ((instr & 0xf0d0) == 0xf010) {
|
if ((instr & 0xf0d0) == 0xf010) {
|
||||||
state->Reg[rd_idx] = (rn_lo * rn_hi) + (rm_lo * rm_hi);
|
state->Reg[rd_idx] = (rn_lo * rm_lo) + (rn_hi * rm_hi);
|
||||||
}
|
}
|
||||||
// SMUSD
|
// SMUSD
|
||||||
else if ((instr & 0xf0d0) == 0xf050) {
|
else if ((instr & 0xf0d0) == 0xf050) {
|
||||||
state->Reg[rd_idx] = (rn_lo * rn_hi) - (rm_lo * rm_hi);
|
state->Reg[rd_idx] = (rn_lo * rm_lo) - (rn_hi * rm_hi);
|
||||||
}
|
}
|
||||||
// SMLAD
|
// SMLAD
|
||||||
else {
|
else {
|
||||||
const u8 ra_idx = BITS(12, 15);
|
const u8 ra_idx = BITS(12, 15);
|
||||||
state->Reg[rd_idx] = (rn_lo * rn_hi) + (rm_lo * rm_hi) + (s32)state->Reg[ra_idx];
|
state->Reg[rd_idx] = (rn_lo * rm_lo) + (rn_hi * rm_hi) + (s32)state->Reg[ra_idx];
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue