Enable building libomp.so for 32-bit x86. This is done by selectively

enabling the functions that save and restore MXCSR, since access to this
register requires SSE support.

Note that you may run into other issues with OpenMP on i386, since this
*not* yet supported upstream, and certainly not extensively tested.

PR:		236062, 236582
MFC after:	1 month
X-MFC-With:	r344779
This commit is contained in:
Dimitry Andric 2019-03-18 21:04:28 +00:00
parent 66110c6521
commit eccf47f57a
3 changed files with 7 additions and 4 deletions

View File

@ -3666,8 +3666,13 @@ extern int __kmp_read_from_file(char const *path, char const *format, ...);
extern void __kmp_query_cpuid(kmp_cpuinfo_t *p);
#define __kmp_load_mxcsr(p) _mm_setcsr(*(p))
#if __SSE__
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(); }
#else
static inline void __kmp_load_mxcsr(const kmp_uint32 *) {}
static inline void __kmp_store_mxcsr(kmp_uint32 *) {}
#endif
extern void __kmp_load_x87_fpu_control_word(kmp_int16 *p);
extern void __kmp_store_x87_fpu_control_word(kmp_int16 *p);

View File

@ -8104,7 +8104,7 @@ __kmp_determine_reduction_method(
#elif KMP_ARCH_X86 || KMP_ARCH_ARM || KMP_ARCH_AARCH || KMP_ARCH_MIPS
#if KMP_OS_LINUX || KMP_OS_WINDOWS || KMP_OS_HURD
#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_WINDOWS || KMP_OS_HURD
// basic tuning

View File

@ -196,9 +196,7 @@ _libproc= libproc
_librtld_db= librtld_db
.endif
.if !defined(COMPAT_32BIT)
SUBDIR.${MK_OPENMP}+= libomp
.endif
SUBDIR.${MK_OPENSSL}+= libmp
SUBDIR.${MK_PMC}+= libpmc libpmcstat
SUBDIR.${MK_RADIUS_SUPPORT}+= libradius