[PATCH] D60916: Add non-SSE wrapper for __kmp_{load,store}_mxcsr

Jonathan Peyton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 1 09:15:37 PDT 2019


jlpeyton added inline comments.


================
Comment at: runtime/src/kmp.h:1212
 
-#define __kmp_load_mxcsr(p) _mm_setcsr(*(p))
+#if __SSE__
+static inline void __kmp_load_mxcsr(const kmp_uint32 *p) { _mm_setcsr(*(p)); }
----------------
This needs to play well with Windows.  Can we stick these in the above operating system split section:
```
#if KMP_OS_UNIX
// Code for __kmp_x86_cpuid, __kmp_load_x87...
// Your current patch 
#else 
// Windows still has these as external function in assembly file
...
static inline void __kmp_load_mxcsr(const kmp_uint32 *p) { _mm_setcsr(*(p)); }
static inline void __kmp_store_mxcsr(kmp_uint32 *p) { *p = _mm_getcsr(); }
#endif // KMP_OS_UNIX
```



Repository:
  rOMP OpenMP

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60916/new/

https://reviews.llvm.org/D60916





More information about the llvm-commits mailing list