changeset 103:a10acb1688e0

thumbdis: buglet in the decoding of sub-from-sp
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 31 Mar 2014 01:59:28 +0000
parents 44db5922ab8f
children 52cec4b71cfe
files arm7dis/thumbdis.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/arm7dis/thumbdis.c	Mon Mar 31 01:52:56 2014 +0000
+++ b/arm7dis/thumbdis.c	Mon Mar 31 01:59:28 2014 +0000
@@ -214,7 +214,7 @@
 		printf("<invalid format 13>\n");
 		return;
 	}
-	loff = (word & 0xFF) << 2;
+	loff = (word & 0x7F) << 2;
 	printf("%s\tsp, #%u", word&0x80 ? "sub" : "add", loff);
 	if (loff >= 10)
 		printf("\t; 0x%x", loff);