From 60a657fbc693f869d7c52e78d47ca99e17e2e36c Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Thu, 22 Aug 2019 15:06:01 +0100 Subject: [PATCH] Fix CFA calculation in AArch64 objc_msgSend. Prior to this, throwing an exception from a +initialize method would leave the stack pointer 16 bytes offset from its correct location. --- objc_msgSend.aarch64.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/objc_msgSend.aarch64.S b/objc_msgSend.aarch64.S index a571bba..31b6b52 100644 --- a/objc_msgSend.aarch64.S +++ b/objc_msgSend.aarch64.S @@ -54,9 +54,9 @@ stp fp, lr, [sp, #192] add fp, sp, 192 stp \receiver, x8, [sp, #-16]! - .cfi_def_cfa fp, 0 - .cfi_offset fp, 0 - .cfi_offset lr, 8 + .cfi_def_cfa fp, 16 + .cfi_offset fp, -16 + .cfi_offset lr, -8 // We now have all argument registers, the link // register and the receiver spilled on the // stack, with sp containing