[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
Mon Nov 28 03:22:32 PST 2022
Ami-zhang created this revision.
Ami-zhang added reviewers: SixWeining, MaskRay, xen0n, wangleiat, xry111, prcups.
Herald added a subscriber: StephenFan.
Herald added a project: All.
Ami-zhang requested review of this revision.
Herald added a project: OpenMP.
Herald added a subscriber: openmp-commits.
This patch fixes tests masked.c and master.c.
Repository:
rG LLVM Github Monorepo
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", \
- ompt_get_thread_data()->value, ((char *)addr) - 4, \
- ((char *)addr) - 8)
+ ompt_get_thread_data()->value, ((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.478177.patch
Type: text/x-patch
Size: 1045 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20221128/01ff77c8/attachment.bin>
More information about the Openmp-commits
mailing list