summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Jarosch <tomj@simonv.com>2015-01-12 19:26:16 +0100
committerThomas Jarosch <tomj@simonv.com>2015-01-12 19:26:23 +0100
commit7361a433d09358a339e4ea81d5da3f7dd7f1b1ca (patch)
tree1457e62befd771cf3ff32b44fd135fa1079b245c /lib
parentfa592cc7255a91715b5bd91a3a003b848bcba5f2 (diff)
downloadrockbox-7361a433d09358a339e4ea81d5da3f7dd7f1b1ca.tar.gz
rockbox-7361a433d09358a339e4ea81d5da3f7dd7f1b1ca.tar.bz2
rockbox-7361a433d09358a339e4ea81d5da3f7dd7f1b1ca.zip
ARM unwinder for thumb: Fix broken SUB opcode
Detected while looking through the code. Patch submitted upstream. Change-Id: I7ebe7b5f5947cf3df1b054d545dba92829f21b99
Diffstat (limited to 'lib')
-rw-r--r--lib/unwarminder/unwarm_thumb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/unwarminder/unwarm_thumb.c b/lib/unwarminder/unwarm_thumb.c
index 027d951f33..b71d9732b1 100644
--- a/lib/unwarminder/unwarm_thumb.c
+++ b/lib/unwarminder/unwarm_thumb.c
@@ -244,7 +244,7 @@ UnwResult UnwStartThumb(UnwState * const state)
case 3: /* SUB */
UnwPrintd5("SUB r%d, #0x%d\t; r%d %s",
rd, offset8, rd, M_Origin2Str(state->regData[rd].o));
- state->regData[rd].v += offset8;
+ state->regData[rd].v -= offset8;
state->regData[rd].o |= REG_VAL_ARITHMETIC;
break;
}