From 5d7238cae8061f64a0eaa18cf6e823283c617b66 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Thu, 17 Mar 2016 11:39:01 +0100 Subject: [PATCH] ArmPkg/ArmExceptionLib: avoid indirect call if using vector table in place If we are using the vector table in place, there is no need to make an indirect call to the common handler routine from the vector table entries, so just use a straight branch instruction in that case. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm Reviewed-by: Eugene Cohen --- ArmPkg/Library/ArmExceptionLib/AArch64/ExceptionSupport.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ArmPkg/Library/ArmExceptionLib/AArch64/ExceptionSupport.S b/ArmPkg/Library/ArmExceptionLib/AArch64/ExceptionSupport.S index c7ea061a93..0fd304db2d 100644 --- a/ArmPkg/Library/ArmExceptionLib/AArch64/ExceptionSupport.S +++ b/ArmPkg/Library/ArmExceptionLib/AArch64/ExceptionSupport.S @@ -187,9 +187,13 @@ VECTOR_BASE(ExceptionHandlersStart) mov x0, #\val // Jump to our general handler to deal with all the common parts and process the exception. +#if defined(ARM_RELOCATE_VECTORS) ldr x1, =ASM_PFX(CommonExceptionEntry) br x1 .ltorg +#else + b ASM_PFX(CommonExceptionEntry) +#endif .endm //