/** @file\r
Default exception handler\r
\r
- Copyright (c) 2008-2010, Apple Inc. All rights reserved.\r
+ Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>\r
\r
- All rights reserved. This program and the accompanying materials\r
+ This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
"2"\r
};\r
\r
-#define COND(_a) gCondition[(_a) >> 28]\r
+#define COND(_a) gCondition[((_a) >> 28)]\r
\r
CHAR8 *gReg[] = {\r
"r0",\r
- "r1",\r
"r2",\r
"r3",\r
"r4",\r
@param OpCodePtr Pointer to pointer of ARM instruction to disassemble. \r
@param Buf Buffer to sprintf disassembly into.\r
@param Size Size of Buf in bytes. \r
+ @param Extended TRUE dump hex for instruction too.\r
\r
**/\r
VOID\r
DisassembleArmInstruction (\r
IN UINT32 **OpCodePtr,\r
OUT CHAR8 *Buf,\r
- OUT UINTN Size\r
+ OUT UINTN Size,\r
+ IN BOOLEAN Extended\r
)\r
{\r
UINT32 OpCode = **OpCodePtr;\r
Rd = (OpCode >> 12) & 0xf;\r
Rm = (OpCode & 0xf);\r
\r
+\r
+ if (Extended) {\r
+ Index = AsciiSPrint (Buf, Size, "0x%08x ", OpCode);\r
+ Buf += Index;\r
+ Size -= Index;\r
+ }\r
+\r
// LDREX, STREX\r
if ((OpCode & 0x0fe000f0) == 0x01800090) {\r
if (L) {\r
if ((OpCode & 0xfd70f000 ) == 0xf550f000) {\r
Index = AsciiSPrint (Buf, Size, "PLD");\r
} else {\r
- Index = AsciiSPrint (Buf, Size, "%a%a%a%a %a, ", L ? "LDR" : "STR", COND (OpCode), BYTE (B), (!P & W) ? "T":"", gReg[Rd]); \r
+ Index = AsciiSPrint (Buf, Size, "%a%a%a%a %a, ", L ? "LDR" : "STR", COND (OpCode), BYTE (B), (!(P) && W) ? "T":"", gReg[Rd]); \r
}\r
if (P) {\r
if (!I) {\r