Skip to content

Commit a3c0f70

Browse files
authored
[NFC] fix failed ompt tests on M1 device (llvm#65696)
Fix the 2 failed ompt tests on M1 device found on llvm#63194. ``` libomp :: ompt/synchronization/masked.c libomp :: ompt/synchronization/master.c ``` For the details of this fix, please check the origin discussion in llvm#63194 (comment) Thanks @jprotze for the fix.
1 parent 85b2e9c commit a3c0f70

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

openmp/runtime/test/ompt/callback.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,17 @@ ompt_label_##id:
189189
#elif KMP_ARCH_AARCH64
190190
// On AArch64 the NOP instruction is 4 bytes long, can be followed by inserted
191191
// store instruction (another 4 bytes long).
192-
#define print_possible_return_addresses(addr) \
193-
printf("%" PRIu64 ": current_address=%p or %p\n", ompt_get_thread_data()->value, \
194-
((char *)addr) - 4, ((char *)addr) - 8)
192+
#if KMP_OS_DARWIN
193+
#define print_possible_return_addresses(addr) \
194+
printf("%" PRIu64 ": current_address=%p or %p or %p\n", \
195+
ompt_get_thread_data()->value, ((char *)addr) - 4, \
196+
((char *)addr) - 8, ((char *)addr) - 12)
197+
#else
198+
#define print_possible_return_addresses(addr) \
199+
printf("%" PRIu64 ": current_address=%p or %p\n", \
200+
ompt_get_thread_data()->value, ((char *)addr) - 4, \
201+
((char *)addr) - 8)
202+
#endif
195203
#elif KMP_ARCH_RISCV64
196204
#if __riscv_compressed
197205
// On RV64GC the C.NOP instruction is 2 byte long. In addition, the compiler

0 commit comments

Comments
 (0)