From 2e868fc00b511b3d09b47aacb325fc8089e6b358 Mon Sep 17 00:00:00 2001 From: pstef <3462925+pstef@users.noreply.github.com> Date: Sat, 3 May 2025 12:07:56 +0000 Subject: [PATCH] Pop fast-math at the end of the file so that it doesn't affect the rest of the code in Griffin builds. This is unfortunately GCC-only, but Clang will miss only 1 vectorization. --- libretro-common/audio/resampler/drivers/sinc_resampler.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libretro-common/audio/resampler/drivers/sinc_resampler.c b/libretro-common/audio/resampler/drivers/sinc_resampler.c index c294af352e..226d8aeb8b 100644 --- a/libretro-common/audio/resampler/drivers/sinc_resampler.c +++ b/libretro-common/audio/resampler/drivers/sinc_resampler.c @@ -22,7 +22,8 @@ /* Bog-standard windowed SINC implementation. */ -#if defined(__GNUC__) && defined(__OPTIMIZE__) +#if defined(__GNUC__) && defined(__OPTIMIZE__) && !defined(__clang__) +#pragma GCC push_options #pragma GCC optimize ("fast-math") #endif @@ -1027,3 +1028,7 @@ retro_resampler_t sinc_resampler = { "sinc", "sinc" }; + +#if defined(__GNUC__) && defined(__OPTIMIZE__) && !defined(__clang__) +#pragma GCC pop_options +#endif