1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-11 23:54:18 +00:00

Add comment above AppleClang workaround in FloatVectorOperations::setFpStatusRegister()

This commit is contained in:
ed 2021-10-07 12:32:54 +01:00
parent 051e0ed6d6
commit ca16bf44b8

View file

@ -1051,6 +1051,8 @@ intptr_t JUCE_CALLTYPE FloatVectorOperations::getFpStatusRegister() noexcept
void JUCE_CALLTYPE FloatVectorOperations::setFpStatusRegister (intptr_t fpsr) noexcept
{
#if JUCE_INTEL && JUCE_USE_SSE_INTRINSICS
// the volatile keyword here is needed to workaround a bug in AppleClang 13.0
// which aggressively optimises away the variable otherwise
volatile auto fpsr_w = static_cast<uint32_t> (fpsr);
_mm_setcsr (fpsr_w);
#elif defined (__arm64__) || defined (__aarch64__) || JUCE_USE_ARM_NEON