From 7e51a0f5467a67f2960a694fbad56c4a0bb0d342 Mon Sep 17 00:00:00 2001 From: tyfkda Date: Tue, 31 Oct 2023 13:42:24 +0900 Subject: [PATCH] Fix callee save count on aarch64 --- src/cc/arch/aarch64/ir_aarch64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cc/arch/aarch64/ir_aarch64.c b/src/cc/arch/aarch64/ir_aarch64.c index c398e835a..d6ffb68b6 100644 --- a/src/cc/arch/aarch64/ir_aarch64.c +++ b/src/cc/arch/aarch64/ir_aarch64.c @@ -784,7 +784,7 @@ int push_callee_save_regs(unsigned long used, unsigned long fused) { else STR(saves[i], PRE_INDEX(SP, -16)); } - return count + fcount; + return ALIGN(count, 2) + ALIGN(fcount, 2); } void pop_callee_save_regs(unsigned long used, unsigned long fused) {