From 77c1db47efb3cbc37b59b4be8eaa9ebaecedf360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20W=C3=B3jt=20=28Cognizant=29?= Date: Mon, 3 Nov 2025 08:34:54 +0100 Subject: [PATCH] [OpenMP][AArch64] Fix frame pointer save in microtask (#165313) When OMPT is enabled, the stack pointer was not saved to frame pointer register immediately after storing the frame pointer to the stack. Therefore the frame pointers did not constitute a proper chain. Fixes [#163352](https://github.com/llvm/llvm-project/issues/163352) --- openmp/runtime/src/z_Linux_asm.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openmp/runtime/src/z_Linux_asm.S b/openmp/runtime/src/z_Linux_asm.S index 684c7e281644..12fea67e000e 100644 --- a/openmp/runtime/src/z_Linux_asm.S +++ b/openmp/runtime/src/z_Linux_asm.S @@ -1358,10 +1358,10 @@ __tid = 8 PROC __kmp_invoke_microtask PACBTI_C - stp x29, x30, [sp, #-16]! # if OMPT_SUPPORT stp x19, x20, [sp, #-16]! # endif + stp x29, x30, [sp, #-16]! mov x29, sp orr w9, wzr, #1 @@ -1415,11 +1415,11 @@ KMP_LABEL(kmp_1): blr x8 orr w0, wzr, #1 mov sp, x29 + ldp x29, x30, [sp], #16 # if OMPT_SUPPORT str xzr, [x19] ldp x19, x20, [sp], #16 # endif - ldp x29, x30, [sp], #16 PACBTI_RET ret