[Openmp-commits] [PATCH] D42795: make libomp work on amd64 x32 ABI

Jonathan Peyton via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Feb 1 13:23:45 PST 2018


jlpeyton added a comment.

I guess first and foremost, we need to make sure that we want KMP_ARCH_X86, KMP_ARCH_X86_64, and KMP_ARCH_X86_X32 to be mutually exclusive macros i.e., different architectures as far as CMake is concerned.  If we want them to be mutually exclusive, then there is more work to be done including but not limited to:

1. Adding a line to LibompGetArchitecture.cmake to detect it.
2. Adding an architecture to runtime/CMakeLists.txt (maybe X32, look for "IA32" or "INTEL64" for an example)
3. Going through the cmake/* files and making sure the X32 architecture is properly handled (similar to IA32 or INTEL64)
4. Adding x32 architecture to tools/lib/Platform.pm (use 32e as an example to copy and paste for x32)
5. Go through the source code again and make sure each KMP_ARCH_X86 or KMP_ARCH_X86_64 section makes sense for KMP_ARCH_X86_X32.  For example, in kmp_os.h, there are TCR_* macros which depend on the pointer size (similar for KMP_COMPARE_AND_STORE_PTR()).  Since it appears that X32 uses four byte pointers it should be paired with KMP_ARCH_X86 in these cases, but it uses elements of the X86_64 ABI in other situations as well.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D42795





More information about the Openmp-commits mailing list