3333PX_COMPILE_TIME_ASSERT (8 * sizeof (uint32_t ) >= sizeof (fenv_t ));
3434#endif
3535
36- #if PX_OSX
36+ #if PX_OSX && (PX_X86 || PX_X64)
3737// osx defines SIMD as standard for floating point operations.
3838#include < xmmintrin.h>
3939#endif
@@ -47,7 +47,7 @@ physx::shdfnd::FPUGuard::FPUGuard()
4747#elif PX_PS4
4848 // not supported
4949 PX_UNUSED (mControlWords );
50- #elif PX_OSX
50+ #elif PX_OSX && (PX_X86 || PX_X64)
5151 mControlWords [0 ] = _mm_getcsr ();
5252 // set default (disable exceptions: _MM_MASK_MASK) and FTZ (_MM_FLUSH_ZERO_ON), DAZ (_MM_DENORMALS_ZERO_ON: (1<<6))
5353 _mm_setcsr (_MM_MASK_MASK | _MM_FLUSH_ZERO_ON | (1 << 6 ));
@@ -76,7 +76,7 @@ physx::shdfnd::FPUGuard::~FPUGuard()
7676// not supported unless ARM_HARD_FLOAT is enabled.
7777#elif PX_PS4
7878// not supported
79- #elif PX_OSX
79+ #elif PX_OSX && (PX_X86 || PX_X64)
8080 // restore control word and clear exception flags
8181 // (setting exception state flags cause exceptions on the first following fp operation)
8282 _mm_setcsr (mControlWords [0 ] & ~_MM_EXCEPT_MASK);
@@ -92,7 +92,7 @@ PX_FOUNDATION_API void physx::shdfnd::enableFPExceptions()
9292#if PX_LINUX && !defined(__EMSCRIPTEN__)
9393 feclearexcept (FE_ALL_EXCEPT );
9494 feenableexcept (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW );
95- #elif PX_OSX
95+ #elif PX_OSX && (PX_X86 || PX_X64)
9696 // clear any pending exceptions
9797 // (setting exception state flags cause exceptions on the first following fp operation)
9898 uint32_t control = _mm_getcsr () & ~_MM_EXCEPT_MASK;
@@ -108,7 +108,7 @@ PX_FOUNDATION_API void physx::shdfnd::disableFPExceptions()
108108{
109109#if PX_LINUX && !defined(__EMSCRIPTEN__)
110110 fedisableexcept (FE_ALL_EXCEPT );
111- #elif PX_OSX
111+ #elif PX_OSX && (PX_X86 || PX_X64)
112112 // clear any pending exceptions
113113 // (setting exception state flags cause exceptions on the first following fp operation)
114114 uint32_t control = _mm_getcsr () & ~_MM_EXCEPT_MASK;
0 commit comments