diff --git a/ArmPkg/Include/AsmMacroIoLibV8.h b/ArmPkg/Include/AsmMacroIoLibV8.h index 135aaeca5d..81164ea9c9 100644 --- a/ArmPkg/Include/AsmMacroIoLibV8.h +++ b/ArmPkg/Include/AsmMacroIoLibV8.h @@ -41,8 +41,19 @@ Name: ; \ AARCH64_BTI(c) +#define _ASM_FUNC_ALIGN(Name, Section, Align) \ + .global Name ; \ + .section #Section, "ax" ; \ + .type Name, %function ; \ + .balign Align ; \ + Name: ; \ + AARCH64_BTI(c) + #define ASM_FUNC(Name) _ASM_FUNC(ASM_PFX(Name), .text. ## Name) +#define ASM_FUNC_ALIGN(Name, Align) \ + _ASM_FUNC_ALIGN(ASM_PFX(Name), .text. ## Name, Align) + #define MOV32(Reg, Val) \ movz Reg, (Val) >> 16, lsl #16 ; \ movk Reg, (Val) & 0xffff