[Openmp-commits] [openmp] [OpenMP][test] Define print_possible_return_address on SPARC (PR #138523)

Rainer Orth via Openmp-commits openmp-commits at lists.llvm.org
Thu May 8 04:52:56 PDT 2025


================
@@ -311,6 +311,14 @@ ompt_label_##id:
   printf("%" PRIu64 ": current_address=%p or %p or %p\n",                      \
          ompt_get_thread_data()->value, ((char *)addr) - 2,                    \
          ((char *)addr) - 8, ((char *)addr) - 12)
+#elif KMP_ARCH_SPARC
+// FIXME: Need to distinguish between 32 and 64-bit SPARC?
+// On SPARC the NOP instruction is 4 bytes long.
+// FIXME: Explain.  Can use __builtin_frob_return_addr?
+#define print_possible_return_addresses(addr)                                  \
----------------
rorth wrote:

Sorry, I missed this question: never got an email notification for the update.

You can see this in `runtime/test/ompt/callback.h`: `print_current_address` first emits a `nop` insn followed by a local label, then passes that label's address to `print_possible_return_addresses`.

https://github.com/llvm/llvm-project/pull/138523


More information about the Openmp-commits mailing list