[Openmp-commits] [PATCH] D138785: [OMPT][test] Fix mismatch error between the current address and the return address
Limin Zhang via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Nov 30 00:20:26 PST 2022
Ami-zhang updated this revision to Diff 478833.
Ami-zhang added a comment.
Addressed @protze.joachim comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138785/new/
https://reviews.llvm.org/D138785
Files:
openmp/runtime/test/ompt/callback.h
Index: openmp/runtime/test/ompt/callback.h
===================================================================
--- openmp/runtime/test/ompt/callback.h
+++ openmp/runtime/test/ompt/callback.h
@@ -209,11 +209,13 @@
#endif
#elif KMP_ARCH_LOONGARCH64
// On LoongArch64 the NOP instruction is 4 bytes long, can be followed by
-// inserted jump instruction (another 4 bytes long).
+// inserted jump instruction (another 4 bytes long). And an additional jump
+// instruction may appear (adding 4 more bytes) when the NOP is referenced
+// elsewhere (ie. another branch).
#define print_possible_return_addresses(addr) \
- printf("%" PRIu64 ": current_address=%p or %p\n", \
+ printf("%" PRIu64 ": current_address=%p or %p or %p\n", \
ompt_get_thread_data()->value, ((char *)addr) - 4, \
- ((char *)addr) - 8)
+ ((char *)addr) - 8, ((char *)addr) - 12)
#else
#error Unsupported target architecture, cannot determine address offset!
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138785.478833.patch
Type: text/x-patch
Size: 1065 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20221130/de289ee4/attachment.bin>
More information about the Openmp-commits
mailing list