]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg/ArmExceptionLib: avoid indirect call if using vector table in place
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 17 Mar 2016 10:39:01 +0000 (11:39 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 22 Mar 2016 13:39:02 +0000 (14:39 +0100)
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 <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Eugene Cohen <eugene@hp.com>
ArmPkg/Library/ArmExceptionLib/AArch64/ExceptionSupport.S

index c7ea061a93eae220b9623e5832742abe3764963e..0fd304db2dbfeb73be59d63ca69a023d24318294 100644 (file)
@@ -187,9 +187,13 @@ VECTOR_BASE(ExceptionHandlersStart)
   mov       x0, #\val\r
 \r
   // Jump to our general handler to deal with all the common parts and process the exception.\r
+#if defined(ARM_RELOCATE_VECTORS)\r
   ldr       x1, =ASM_PFX(CommonExceptionEntry)\r
   br        x1\r
   .ltorg\r
+#else\r
+  b         ASM_PFX(CommonExceptionEntry)\r
+#endif\r
   .endm\r
 \r
 //\r