Browse Source

Clarified the JUCE_USE_INTRINSICS by changing its name to JUCE_USE_MSVC_INTRINSICS

tags/2021-05-28
jules 10 years ago
parent
commit
f376a82a56
8 changed files with 13 additions and 13 deletions
  1. +2
    -2
      modules/juce_core/maths/juce_BigInteger.cpp
  2. +1
    -1
      modules/juce_core/memory/juce_Atomic.h
  3. +4
    -4
      modules/juce_core/memory/juce_ByteOrder.h
  4. +2
    -2
      modules/juce_core/native/juce_win32_SystemStats.cpp
  5. +1
    -1
      modules/juce_core/native/juce_win32_Threads.cpp
  6. +1
    -1
      modules/juce_core/system/juce_PlatformDefs.h
  7. +1
    -1
      modules/juce_core/system/juce_StandardHeader.h
  8. +1
    -1
      modules/juce_core/system/juce_TargetPlatform.h

+ 2
- 2
modules/juce_core/maths/juce_BigInteger.cpp View File

@@ -307,7 +307,7 @@ void BigInteger::negate() noexcept
negative = (! negative) && ! isZero();
}
#if JUCE_USE_INTRINSICS && ! defined (__INTEL_COMPILER)
#if JUCE_USE_MSVC_INTRINSICS && ! defined (__INTEL_COMPILER)
#pragma intrinsic (_BitScanReverse)
#endif
@@ -317,7 +317,7 @@ inline static int highestBitInInt (uint32 n) noexcept
#if JUCE_GCC
return 31 - __builtin_clz (n);
#elif JUCE_USE_INTRINSICS
#elif JUCE_USE_MSVC_INTRINSICS
unsigned long highest;
_BitScanReverse (&highest, n);
return (int) highest;


+ 1
- 1
modules/juce_core/memory/juce_Atomic.h View File

@@ -218,7 +218,7 @@ private:
#else
#define JUCE_ATOMICS_WINDOWS 1 // Windows with intrinsics
#if JUCE_USE_INTRINSICS
#if JUCE_USE_MSVC_INTRINSICS
#ifndef __INTEL_COMPILER
#pragma intrinsic (_InterlockedExchange, _InterlockedIncrement, _InterlockedDecrement, _InterlockedCompareExchange, \
_InterlockedCompareExchange64, _InterlockedExchangeAdd, _ReadWriteBarrier)


+ 4
- 4
modules/juce_core/memory/juce_ByteOrder.h View File

@@ -110,13 +110,13 @@ private:
//==============================================================================
#if JUCE_USE_INTRINSICS && ! defined (__INTEL_COMPILER)
#if JUCE_USE_MSVC_INTRINSICS && ! defined (__INTEL_COMPILER)
#pragma intrinsic (_byteswap_ulong)
#endif
inline uint16 ByteOrder::swap (uint16 n) noexcept
{
#if JUCE_USE_INTRINSICSxxx // agh - the MS compiler has an internal error when you try to use this intrinsic!
#if JUCE_USE_MSVC_INTRINSICSxxx // agh - the MS compiler has an internal error when you try to use this intrinsic!
return static_cast<uint16> (_byteswap_ushort (n));
#else
return static_cast<uint16> ((n << 8) | (n >> 8));
@@ -130,7 +130,7 @@ inline uint32 ByteOrder::swap (uint32 n) noexcept
#elif JUCE_GCC && JUCE_INTEL && ! JUCE_NO_INLINE_ASM
asm("bswap %%eax" : "=a"(n) : "a"(n));
return n;
#elif JUCE_USE_INTRINSICS
#elif JUCE_USE_MSVC_INTRINSICS
return _byteswap_ulong (n);
#elif JUCE_MSVC && ! JUCE_NO_INLINE_ASM
__asm {
@@ -150,7 +150,7 @@ inline uint64 ByteOrder::swap (uint64 value) noexcept
{
#if JUCE_MAC || JUCE_IOS
return OSSwapInt64 (value);
#elif JUCE_USE_INTRINSICS
#elif JUCE_USE_MSVC_INTRINSICS
return _byteswap_uint64 (value);
#else
return (((int64) swap ((uint32) value)) << 32) | swap ((uint32) (value >> 32));


+ 2
- 2
modules/juce_core/native/juce_win32_SystemStats.cpp View File

@@ -38,7 +38,7 @@ void Logger::outputDebugString (const String& text)
#endif
//==============================================================================
#if JUCE_USE_INTRINSICS
#if JUCE_USE_MSVC_INTRINSICS
// CPU info functions using intrinsics...
@@ -313,7 +313,7 @@ double Time::getMillisecondCounterHiRes() noexcept { return hiResCounterHa
//==============================================================================
static int64 juce_getClockCycleCounter() noexcept
{
#if JUCE_USE_INTRINSICS
#if JUCE_USE_MSVC_INTRINSICS
// MS intrinsics version...
return (int64) __rdtsc();


+ 1
- 1
modules/juce_core/native/juce_win32_Threads.cpp View File

@@ -36,7 +36,7 @@ void* getUser32Function (const char* functionName)
}
//==============================================================================
#if ! JUCE_USE_INTRINSICS
#if ! JUCE_USE_MSVC_INTRINSICS
// In newer compilers, the inline versions of these are used (in juce_Atomic.h), but in
// older ones we have to actually call the ops as win32 functions..
long juce_InterlockedExchange (volatile long* a, long b) noexcept { return InterlockedExchange (a, b); }


+ 1
- 1
modules/juce_core/system/juce_PlatformDefs.h View File

@@ -68,7 +68,7 @@
@see jassert()
*/
#define juce_breakDebugger { ::kill (0, SIGTRAP); }
#elif JUCE_USE_INTRINSICS
#elif JUCE_USE_MSVC_INTRINSICS
#ifndef __INTEL_COMPILER
#pragma intrinsic (__debugbreak)
#endif


+ 1
- 1
modules/juce_core/system/juce_StandardHeader.h View File

@@ -73,7 +73,7 @@
#include <vector>
#include <algorithm>
#if JUCE_USE_INTRINSICS
#if JUCE_USE_MSVC_INTRINSICS
#include <intrin.h>
#endif


+ 1
- 1
modules/juce_core/system/juce_TargetPlatform.h View File

@@ -192,7 +192,7 @@
#endif
#if JUCE_64BIT || ! JUCE_VC7_OR_EARLIER
#define JUCE_USE_INTRINSICS 1
#define JUCE_USE_MSVC_INTRINSICS 1
#endif
#else
#error unknown compiler


Loading…
Cancel
Save