This is an automated email from the ASF dual-hosted git repository. archer pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push: new ca92c208c1 arch/arm64: generate error if context size is not aligned to 16bytes ca92c208c1 is described below commit ca92c208c1ba8879c79504834b5200d36f8d2741 Author: Neo Xu <neo.xu1...@gmail.com> AuthorDate: Wed Feb 5 11:01:38 2025 +0800 arch/arm64: generate error if context size is not aligned to 16bytes Make sure the registers context size is aligned to 16bytes as required by armv8-a. This issue has been reported earlier, thus make sense to make sure it won't happen in future. Signed-off-by: Neo Xu <neo.xu1...@gmail.com> --- arch/arm64/include/irq.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/include/irq.h b/arch/arm64/include/irq.h index 485d70492f..b07bab39b3 100644 --- a/arch/arm64/include/irq.h +++ b/arch/arm64/include/irq.h @@ -228,6 +228,10 @@ #define XCPTCONTEXT_REGS (ARM64_CONTEXT_REGS + FPU_CONTEXT_REGS) #define XCPTCONTEXT_SIZE (8 * XCPTCONTEXT_REGS) +#if XCPTCONTEXT_SIZE % 16 != 0 +# error "ARM64_CONTEXT_REGS and FPU_CONTEXT_REGS must be an even number to ensure the stack is aligned to 16 bytes" +#endif + /* Friendly register names */ #define REG_FP REG_X29