This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Fix asm for arm64-darwin
Needs RevisionPublic

Authored by fxcoudert on Nov 7 2020, 6:07 AM.

Details

Reviewers
jdoerfert
AndreyChurbanov
Group Reviewers
Restricted Project
Summary

Fixes https://bugs.llvm.org/show_bug.cgi?id=47609

Two issues to be fixed, allowing OpenMP to compile and run on Apple Silicon (arm64-darrwin):

  • __kmp_unnamed_criticaladdr needs an extra underscore on Darwin
  • the .size should be Linux-only

Both fixes are pretty much the same as the existing X86 and X86_64 Darwin code at the top of that same file.

Diff Detail

Event Timeline

fxcoudert created this revision.Nov 7 2020, 6:07 AM
fxcoudert requested review of this revision.Nov 7 2020, 6:07 AM
Michael_Pique added a subscriber: Michael_Pique.EditedNov 7 2020, 12:10 PM

Please see discussion D297341 for similar earlier proposal. That patch (D88252: z_Linux_asm.S modifications for arm64 (AARCH64) for Darwin/macOS) incorporated a reviewer suggestion to guard the .size with

#if __ELF__

as more general than

#if KMP_OS_LINUX

That patch was listed as accepted 23 October 2020. Would be good to test both versions on an ARM64 Linux system, but I do not have access to one.

@kiranchandramohan @DavidTruby @richard.barton.arm Could you test this patch and D88252 as described above? I don't have proper setup but you should be able to test all system of interest I assume.

I tested with make check-openmp and make check-clang on an AArch64 linux machine and both versions (D91002,D88252) pass.
If you were asking for a different kind of testing then please let me know.

kongyi added a subscriber: kongyi.Nov 23 2020, 3:21 AM

I tested with make check-openmp and make check-clang on an AArch64 linux machine and both versions (D91002,D88252) pass.
If you were asking for a different kind of testing then please let me know.

Once the D88252 landed this patch is not needed any more and can be abandoned.

AndreyChurbanov requested changes to this revision.Mar 9 2021, 8:09 AM
This revision now requires changes to proceed.Mar 9 2021, 8:09 AM