[Openmp-commits] [openmp] 600c2b0 - [OMPT][test] Fix mismatch error between the current address and the return address for LoongArch
Weining Lu via Openmp-commits
openmp-commits at lists.llvm.org
Tue Dec 6 19:58:51 PST 2022
Author: zhanglimin
Date: 2022-12-07T11:58:28+08:00
New Revision: 600c2b0f1e2eea7038e7e64d473bd4942b6440bd
URL: https://github.com/llvm/llvm-project/commit/600c2b0f1e2eea7038e7e64d473bd4942b6440bd
DIFF: https://github.com/llvm/llvm-project/commit/600c2b0f1e2eea7038e7e64d473bd4942b6440bd.diff
LOG: [OMPT][test] Fix mismatch error between the current address and the return address for LoongArch
This patch fixes tests masked.c and master.c on LoongArch.
Reviewed By: SixWeining, protze.joachim
Differential Revision: https://reviews.llvm.org/D138785
Added:
Modified:
openmp/runtime/test/ompt/callback.h
Removed:
################################################################################
diff --git a/openmp/runtime/test/ompt/callback.h b/openmp/runtime/test/ompt/callback.h
index 2b39f6a0ce465..dc228e449725f 100644
--- a/openmp/runtime/test/ompt/callback.h
+++ b/openmp/runtime/test/ompt/callback.h
@@ -209,11 +209,13 @@ ompt_label_##id:
#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
More information about the Openmp-commits
mailing list