comparison arm7dis/thumbdis.c @ 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 78e4702884e3
children c883e60df239
comparison
equal deleted inserted replaced
102:44db5922ab8f 103:a10acb1688e0
212 212
213 if ((word & 0xFF00) != 0xB000) { 213 if ((word & 0xFF00) != 0xB000) {
214 printf("<invalid format 13>\n"); 214 printf("<invalid format 13>\n");
215 return; 215 return;
216 } 216 }
217 loff = (word & 0xFF) << 2; 217 loff = (word & 0x7F) << 2;
218 printf("%s\tsp, #%u", word&0x80 ? "sub" : "add", loff); 218 printf("%s\tsp, #%u", word&0x80 ? "sub" : "add", loff);
219 if (loff >= 10) 219 if (loff >= 10)
220 printf("\t; 0x%x", loff); 220 printf("\t; 0x%x", loff);
221 putchar('\n'); 221 putchar('\n');
222 } 222 }