summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNormmatt <normmatt234@gmail.com>2014-12-17 08:56:58 +0100
committerLioncash <mathew1800@gmail.com>2014-12-17 09:24:25 +0100
commitbc81cc94901b72bf68e8241cf65e0e830b43fc93 (patch)
tree9ef4145ee3ede9854f1222d453594517618014e4
parentarmemu: Fix SXTAB (diff)
downloadyuzu-bc81cc94901b72bf68e8241cf65e0e830b43fc93.tar
yuzu-bc81cc94901b72bf68e8241cf65e0e830b43fc93.tar.gz
yuzu-bc81cc94901b72bf68e8241cf65e0e830b43fc93.tar.bz2
yuzu-bc81cc94901b72bf68e8241cf65e0e830b43fc93.tar.lz
yuzu-bc81cc94901b72bf68e8241cf65e0e830b43fc93.tar.xz
yuzu-bc81cc94901b72bf68e8241cf65e0e830b43fc93.tar.zst
yuzu-bc81cc94901b72bf68e8241cf65e0e830b43fc93.zip
-rw-r--r--src/core/arm/interpreter/armemu.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/arm/interpreter/armemu.cpp b/src/core/arm/interpreter/armemu.cpp
index cffbae7e7..a62658b7c 100644
--- a/src/core/arm/interpreter/armemu.cpp
+++ b/src/core/arm/interpreter/armemu.cpp
@@ -6176,7 +6176,7 @@ L_stm_s_takeabort:
break;
}
- Rm = ((state->Reg[BITS(0, 3)] >> ror) & 0xFF);
+ Rm = ((state->Reg[BITS(0, 3)] >> ror) & 0xFF) | ((state->Reg[BITS(0, 3)] << (32 - ror)) & 0xFF) & 0xFF;
if (BITS(16, 19) == 0xf)
/* UXTB */
@@ -6216,13 +6216,13 @@ L_stm_s_takeabort:
if (ror == -1)
break;
- Rm = ((state->Reg[BITS(0, 3)] >> ror) & 0xFFFF);
+ Rm = ((state->Reg[BITS(0, 3)] >> ror) & 0xFFFF) | ((state->Reg[BITS(0, 3)] << (32 - ror)) & 0xFFFF) & 0xFFFF;
/* UXT */
/* state->Reg[BITS (12, 15)] = Rm; */
/* dyf add */
if (BITS(16, 19) == 0xf) {
- state->Reg[BITS(12, 15)] = (Rm >> (8 * BITS(10, 11))) & 0x0000FFFF;
+ state->Reg[BITS(12, 15)] = Rm;
}
else {
/* UXTAH */
@@ -6230,7 +6230,7 @@ L_stm_s_takeabort:
// printf("rd is %x rn is %x rm is %x rotate is %x\n", state->Reg[BITS (12, 15)], state->Reg[BITS (16, 19)]
// , Rm, BITS(10, 11));
// printf("icounter is %lld\n", state->NumInstrs);
- state->Reg[BITS(12, 15)] = (state->Reg[BITS(16, 19)] >> (8 * (BITS(10, 11)))) + Rm;
+ state->Reg[BITS(12, 15)] = state->Reg[BITS(16, 19)] + Rm;
// printf("rd is %x\n", state->Reg[BITS (12, 15)]);
// exit(-1);
}