]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg/DefaultExceptionHandlerLib: put ASSERT (FALSE) last
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 1 Jul 2016 10:29:37 +0000 (12:29 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 1 Jul 2016 11:24:25 +0000 (13:24 +0200)
Putting DEBUG () code after an ASSERT (FALSE) statement is not very
useful, since the code will be unreachable on DEBUG builds and compiled
out on RELEASE builds. So move the ASSERT () statement after it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c

index 45a166ad21aa32affab2be1f642e3b872856562c..31fc936b21ff1bd6dd6977628c1887bfc3bed68b 100644 (file)
@@ -191,7 +191,6 @@ DefaultExceptionHandler (
   DEBUG ((EFI_D_ERROR, "\n ESR : EC 0x%02x  IL 0x%x  ISS 0x%08x\n", (SystemContext.SystemContextAArch64->ESR & 0xFC000000) >> 26, (SystemContext.SystemContextAArch64->ESR >> 25) & 0x1, SystemContext.SystemContextAArch64->ESR & 0x1FFFFFF ));\r
 \r
   DescribeExceptionSyndrome (SystemContext.SystemContextAArch64->ESR);\r
-  ASSERT (FALSE);\r
 \r
   DEBUG ((EFI_D_ERROR, "\nStack dump:\n"));\r
   for (Offset = -256; Offset < 256; Offset += 32) {\r
@@ -204,5 +203,6 @@ DefaultExceptionHandler (
       *(UINT64 *)(SystemContext.SystemContextAArch64->SP + Offset + 24)));\r
   }\r
 \r
+  ASSERT (FALSE);\r
   CpuDeadLoop ();\r
 }\r