[Openmp-commits] [openmp] [NFC] fix failed ompt tests on M1 device (PR #65696)

Lixi Zhou via Openmp-commits openmp-commits at lists.llvm.org
Fri Sep 8 00:31:51 PDT 2023


https://github.com/lixi-zhou updated https://github.com/llvm/llvm-project/pull/65696:

>From 07dab8740a99a1cf13c938d5ac975d3afd4526f2 Mon Sep 17 00:00:00 2001
From: lixizhou <lixi.zhou at asu.edu>
Date: Fri, 8 Sep 2023 00:31:25 -0700
Subject: [PATCH] fix #63194

---
 openmp/runtime/test/ompt/callback.h | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/openmp/runtime/test/ompt/callback.h b/openmp/runtime/test/ompt/callback.h
index 8180b3d2663f769..ecce5357b6ecb59 100644
--- a/openmp/runtime/test/ompt/callback.h
+++ b/openmp/runtime/test/ompt/callback.h
@@ -189,9 +189,17 @@ ompt_label_##id:
 #elif KMP_ARCH_AARCH64
 // On AArch64 the NOP instruction is 4 bytes long, can be followed by inserted
 // store instruction (another 4 bytes long).
-#define print_possible_return_addresses(addr) \
-  printf("%" PRIu64 ": current_address=%p or %p\n", ompt_get_thread_data()->value, \
-         ((char *)addr) - 4, ((char *)addr) - 8)
+#if KMP_OS_DARWIN
+#define print_possible_return_addresses(addr)                                  \
+  printf("%" PRIu64 ": current_address=%p or %p or %p\n",                      \
+         ompt_get_thread_data()->value, ((char *)addr) - 4,                    \
+         ((char *)addr) - 8, ((char *)addr) - 12)
+#else
+#define print_possible_return_addresses(addr)                                  \
+  printf("%" PRIu64 ": current_address=%p or %p\n",                            \
+         ompt_get_thread_data()->value, ((char *)addr) - 4,                    \
+         ((char *)addr) - 8)
+#endif
 #elif KMP_ARCH_RISCV64
 #if __riscv_compressed
 // On RV64GC the C.NOP instruction is 2 byte long. In addition, the compiler



More information about the Openmp-commits mailing list