]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/EbcDxe AARCH64: use tail call for EBC to native thunk
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 17 Aug 2016 14:29:09 +0000 (16:29 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 2 Sep 2016 06:59:22 +0000 (07:59 +0100)
commit3226e315d20c6f572de818d6d1229a88b5b6e7b3
treeb9c4dc90d4dce4047e59385c0ab2652db829d0c4
parent4d1f5a214bb3c7904c26f2634294dee2a18be5d3
MdeModulePkg/EbcDxe AARCH64: use tail call for EBC to native thunk

Instead of pessimistically copying at least 64 bytes from the VM stack
to the native stack, and popping off the register arguments again
before doing the native call, try to avoid touching the stack completely
if the VM stack frame is <= 64 bytes. Also, if the stack frame does exceed
64 bytes, there is no need to copy the first 64 bytes, since we are passing
those in registers anyway.

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: Feng Tian <feng.tian@intel.com>
MdeModulePkg/Universal/EbcDxe/AArch64/EbcLowLevel.S