]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Library/ArmDisassemblerLib/ArmDisassembler.c
ArmPkg/AArch64: Added ARM_HCR_TSC definition
[mirror_edk2.git] / ArmPkg / Library / ArmDisassemblerLib / ArmDisassembler.c
index c3eecbcbcb90b000020af0d3af161263c9c96442..78f0d137ea6bc9a093cdf61c81ad8eeceefd02fd 100644 (file)
@@ -1,9 +1,9 @@
 /** @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
@@ -37,7 +37,7 @@ CHAR8 *gCondition[] = {
   "2"\r
 };\r
 \r
-#define COND(_a)  gCondition[(_a) >> 28]\r
+#define COND(_a)  gCondition[((_a) >> 28)]\r
 \r
 CHAR8 *gReg[] = {\r
   "r0",\r
@@ -225,7 +225,7 @@ DisassembleArmInstruction (
     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), (!& 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