Skip to content

Commit dcd7c8b

Browse files
authored
[OpenMP][AArch64] Workaround for ompt/synchronization tests (#75848)
ompt/synchronization/[masked.c | master.c] tests fail due to a wrong offset being calculated for the possible return addreses. PR #65936 fixes this for Darwin and the same has to be done for Linux. Updates #69627
1 parent 256b214 commit dcd7c8b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

openmp/runtime/test/ompt/callback.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -189,17 +189,14 @@ 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-
#if KMP_OS_DARWIN
192+
// FIXME: PR #65696 addded a third possibility (12 byte offset) to make the
193+
// tests pass on Darwin. Adding the same for other OSes. However, the proper
194+
// fix for this is to remove the extra branch instruction being generated by
195+
// the AArch64 backend. See issue #69627.
193196
#define print_possible_return_addresses(addr) \
194197
printf("%" PRIu64 ": current_address=%p or %p or %p\n", \
195198
ompt_get_thread_data()->value, ((char *)addr) - 4, \
196199
((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
203200
#elif KMP_ARCH_RISCV64
204201
#if __riscv_compressed
205202
// On RV64GC the C.NOP instruction is 2 byte long. In addition, the compiler

0 commit comments

Comments
 (0)