Browse Source

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

v6.1.6
ed 3 years ago
parent
commit
ca16bf44b8
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp

+ 2
- 0
modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp 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


Loading…
Cancel
Save