mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 14:58:13 +08:00
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.xu1990@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user