summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2015-05-31 09:33:07 +0200
committerLioncash <mathew1800@gmail.com>2015-06-01 03:50:18 +0200
commitb64dea80ce5d1413fb5dfcd94f19e77816b6bdf7 (patch)
tree62b07b9fe6400fac6902876cd47c77a796c16c94 /src
parentMerge pull request #830 from SeannyM/qt-noborder (diff)
downloadyuzu-b64dea80ce5d1413fb5dfcd94f19e77816b6bdf7.tar
yuzu-b64dea80ce5d1413fb5dfcd94f19e77816b6bdf7.tar.gz
yuzu-b64dea80ce5d1413fb5dfcd94f19e77816b6bdf7.tar.bz2
yuzu-b64dea80ce5d1413fb5dfcd94f19e77816b6bdf7.tar.lz
yuzu-b64dea80ce5d1413fb5dfcd94f19e77816b6bdf7.tar.xz
yuzu-b64dea80ce5d1413fb5dfcd94f19e77816b6bdf7.tar.zst
yuzu-b64dea80ce5d1413fb5dfcd94f19e77816b6bdf7.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/arm/dyncom/arm_dyncom_thumb.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom_thumb.cpp b/src/core/arm/dyncom/arm_dyncom_thumb.cpp
index 2fc8170be..78552293a 100644
--- a/src/core/arm/dyncom/arm_dyncom_thumb.cpp
+++ b/src/core/arm/dyncom/arm_dyncom_thumb.cpp
@@ -274,9 +274,19 @@ tdstate thumb_translate(u32 addr, u32 instr, u32* ainstr, u32* inst_size) {
? 0xE24DDF00 // SUB
: 0xE28DDF00) // ADD
|(tinstr & 0x007F); // off7
- } else if ((tinstr & 0x0F00) == 0x0e00)
+ } else if ((tinstr & 0x0F00) == 0x0e00) {
*ainstr = 0xEF000000 | 0x180000; // base | BKPT mask
- else {
+ } else if ((tinstr & 0x0F00) == 0x0a00) {
+ static const ARMword subset[3] = {
+ 0xE6BF0F30, // REV
+ 0xE6BF0FB0, // REV16
+ 0xE6FF0FB0, // REVSH
+ };
+
+ *ainstr = subset[BITS(tinstr, 6, 7)] // base
+ | (BITS(tinstr, 0, 2) << 12) // Rd
+ | BITS(tinstr, 3, 5); // Rm
+ } else {
static const ARMword subset[4] = {
0xE92D0000, // STMDB sp!,{rlist}
0xE92D4000, // STMDB sp!,{rlist,lr}