changeset 231:27c269e408af

arm7dis/armdis: bug in the decoding of SWP instructions
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 21 Dec 2017 22:15:00 +0000
parents f5ad21985e20
children 2767ff8d26d5
files arm7dis/armdis.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/arm7dis/armdis.c	Thu Dec 21 21:54:39 2017 +0000
+++ b/arm7dis/armdis.c	Thu Dec 21 22:15:00 2017 +0000
@@ -211,7 +211,7 @@
 			regnames[word&0xF], regnames[(word>>8)&0xF]);
 	else if ((word & 0x0FB00FF0) == 0x01000090)
 		printf("swp%s%s\t%s, %s, [%s]\n", condition_decode[word>>28],
-			word&0x400000, "b", "", regnames[(word>>12)&0xF],
+			word&0x400000 ? "b" : "", regnames[(word>>12)&0xF],
 			regnames[word&0xF], regnames[(word>>16)&0xF]);
 	else
 		printf("<invalid multiply>\n");