Merge branch 'dev' into dev-0.12

This commit is contained in:
David Reid
2025-08-20 16:09:58 +10:00
2 changed files with 26 additions and 16 deletions
+14 -4
View File
@@ -249,12 +249,22 @@ extern "C" {
#ifdef _MSC_VER #ifdef _MSC_VER
#define VERBLIB_INLINE __forceinline #define VERBLIB_INLINE __forceinline
#elif defined(__GNUC__)
#if defined(__STRICT_ANSI__)
#define VERBLIB_GNUC_INLINE_HINT __inline__
#else #else
#ifdef __GNUC__ #define VERBLIB_GNUC_INLINE_HINT inline
#define VERBLIB_INLINE inline __attribute__((always_inline))
#else
#define VERBLIB_INLINE inline
#endif #endif
#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)) || defined(__clang__)
#define VERBLIB_INLINE VERBLIB_GNUC_INLINE_HINT __attribute__((always_inline))
#else
#define VERBLIB_INLINE VERBLIB_GNUC_INLINE_HINT
#endif
#elif defined(__WATCOMC__)
#define VERBLIB_INLINE __inline
#else
#define VERBLIB_INLINE
#endif #endif
#define verblib_max(x, y) (((x) > (y)) ? (x) : (y)) #define verblib_max(x, y) (((x) > (y)) ? (x) : (y))
+10 -10
View File
@@ -11805,7 +11805,7 @@ static MA_INLINE unsigned int ma_disable_denormals(void)
} }
#elif defined(MA_X86) || defined(MA_X64) #elif defined(MA_X86) || defined(MA_X64)
{ {
#if defined(__SSE2__) && !(defined(__TINYC__) || defined(__WATCOMC__) || defined(__COSMOPOLITAN__)) /* <-- Add compilers that lack support for _mm_getcsr() and _mm_setcsr() to this list. */ #if defined(MA_SUPPORT_SSE2) && defined(__SSE2__) && !(defined(__TINYC__) || defined(__WATCOMC__) || defined(__COSMOPOLITAN__)) /* <-- Add compilers that lack support for _mm_getcsr() and _mm_setcsr() to this list. */
{ {
prevState = _mm_getcsr(); prevState = _mm_getcsr();
_mm_setcsr(prevState | MA_MM_DENORMALS_ZERO_MASK | MA_MM_FLUSH_ZERO_MASK); _mm_setcsr(prevState | MA_MM_DENORMALS_ZERO_MASK | MA_MM_FLUSH_ZERO_MASK);
@@ -11845,7 +11845,7 @@ static MA_INLINE void ma_restore_denormals(unsigned int prevState)
} }
#elif defined(MA_X86) || defined(MA_X64) #elif defined(MA_X86) || defined(MA_X64)
{ {
#if defined(__SSE2__) && !(defined(__TINYC__) || defined(__WATCOMC__) || defined(__COSMOPOLITAN__)) /* <-- Add compilers that lack support for _mm_getcsr() and _mm_setcsr() to this list. */ #if defined(MA_SUPPORT_SSE2) && defined(__SSE2__) && !(defined(__TINYC__) || defined(__WATCOMC__) || defined(__COSMOPOLITAN__)) /* <-- Add compilers that lack support for _mm_getcsr() and _mm_setcsr() to this list. */
{ {
_mm_setcsr(prevState); _mm_setcsr(prevState);
} }
@@ -19993,7 +19993,7 @@ Timing
*******************************************************************************/ *******************************************************************************/
#if defined(MA_WIN32) && !defined(MA_POSIX) #if defined(MA_WIN32) && !defined(MA_POSIX)
static LARGE_INTEGER g_ma_TimerFrequency; /* <-- Initialized to zero since it's static. */ static LARGE_INTEGER g_ma_TimerFrequency; /* <-- Initialized to zero since it's static. */
static void ma_timer_init(ma_timer* pTimer) static MA_INLINE void ma_timer_init(ma_timer* pTimer)
{ {
LARGE_INTEGER counter; LARGE_INTEGER counter;
@@ -20005,7 +20005,7 @@ Timing
pTimer->counter = counter.QuadPart; pTimer->counter = counter.QuadPart;
} }
static double ma_timer_get_time_in_seconds(ma_timer* pTimer) static MA_INLINE double ma_timer_get_time_in_seconds(ma_timer* pTimer)
{ {
LARGE_INTEGER counter; LARGE_INTEGER counter;
if (!QueryPerformanceCounter(&counter)) { if (!QueryPerformanceCounter(&counter)) {
@@ -20016,7 +20016,7 @@ Timing
} }
#elif defined(MA_APPLE) && (MAC_OS_X_VERSION_MIN_REQUIRED < 101200) #elif defined(MA_APPLE) && (MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
static ma_uint64 g_ma_TimerFrequency = 0; static ma_uint64 g_ma_TimerFrequency = 0;
static void ma_timer_init(ma_timer* pTimer) static MA_INLINE void ma_timer_init(ma_timer* pTimer)
{ {
mach_timebase_info_data_t baseTime; mach_timebase_info_data_t baseTime;
mach_timebase_info(&baseTime); mach_timebase_info(&baseTime);
@@ -20025,7 +20025,7 @@ Timing
pTimer->counter = mach_absolute_time(); pTimer->counter = mach_absolute_time();
} }
static double ma_timer_get_time_in_seconds(ma_timer* pTimer) static MA_INLINE double ma_timer_get_time_in_seconds(ma_timer* pTimer)
{ {
ma_uint64 newTimeCounter = mach_absolute_time(); ma_uint64 newTimeCounter = mach_absolute_time();
ma_uint64 oldTimeCounter = pTimer->counter; ma_uint64 oldTimeCounter = pTimer->counter;
@@ -20050,7 +20050,7 @@ Timing
#define MA_CLOCK_ID CLOCK_REALTIME #define MA_CLOCK_ID CLOCK_REALTIME
#endif #endif
static void ma_timer_init(ma_timer* pTimer) static MA_INLINE void ma_timer_init(ma_timer* pTimer)
{ {
struct timespec newTime; struct timespec newTime;
clock_gettime(MA_CLOCK_ID, &newTime); clock_gettime(MA_CLOCK_ID, &newTime);
@@ -20058,7 +20058,7 @@ Timing
pTimer->counter = (newTime.tv_sec * 1000000000) + newTime.tv_nsec; pTimer->counter = (newTime.tv_sec * 1000000000) + newTime.tv_nsec;
} }
static double ma_timer_get_time_in_seconds(ma_timer* pTimer) static MA_INLINE double ma_timer_get_time_in_seconds(ma_timer* pTimer)
{ {
ma_uint64 newTimeCounter; ma_uint64 newTimeCounter;
ma_uint64 oldTimeCounter; ma_uint64 oldTimeCounter;
@@ -20072,7 +20072,7 @@ Timing
return (newTimeCounter - oldTimeCounter) / 1000000000.0; return (newTimeCounter - oldTimeCounter) / 1000000000.0;
} }
#else #else
static void ma_timer_init(ma_timer* pTimer) static MA_INLINE void ma_timer_init(ma_timer* pTimer)
{ {
struct timeval newTime; struct timeval newTime;
gettimeofday(&newTime, NULL); gettimeofday(&newTime, NULL);
@@ -20080,7 +20080,7 @@ Timing
pTimer->counter = (newTime.tv_sec * 1000000) + newTime.tv_usec; pTimer->counter = (newTime.tv_sec * 1000000) + newTime.tv_usec;
} }
static double ma_timer_get_time_in_seconds(ma_timer* pTimer) static MA_INLINE double ma_timer_get_time_in_seconds(ma_timer* pTimer)
{ {
ma_uint64 newTimeCounter; ma_uint64 newTimeCounter;
ma_uint64 oldTimeCounter; ma_uint64 oldTimeCounter;