From 007e4dce13673b01a38b19384f54fa50a79a66de Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Sun, 8 Oct 2023 21:17:43 +0200 Subject: ARM64: Restore fp before sp in C stack unwinders. Thanks to Peter Cawley. #1096 --- src/host/buildvm_peobj.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/host') diff --git a/src/host/buildvm_peobj.c b/src/host/buildvm_peobj.c index 7ce3b05a..8f04c496 100644 --- a/src/host/buildvm_peobj.c +++ b/src/host/buildvm_peobj.c @@ -373,11 +373,12 @@ void emit_peobj(BuildCtx *ctx) /* Unwind codes for .text section with handler. */ p = uwc; + CADD_FP(192); /* +2 */ CSAVE_REGS(19, 28, 176); /* +5*2 */ CSAVE_FREGS(8, 15, 96); /* +4*2 */ CSAVE_FPLR(192); /* +1 */ CALLOC_S(208); /* +1 */ - CEND_ALIGN; /* +1 +3 -> 24 */ + CEND_ALIGN; /* +1 +1 -> 24 */ u32 = ((24u >> 2) << 27) | (1u << 20) | (fcofs >> 2); owrite(ctx, &u32, 4); -- cgit v1.2.3-55-g6feb