Skip to content

Commit

Permalink
Correct no zero upper args
Browse files Browse the repository at this point in the history
  • Loading branch information
Auburn committed Apr 6, 2024
1 parent f345b60 commit 86f9cc8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/FastNoise/Generators/Generator.inl
Original file line number Diff line number Diff line change
Expand Up @@ -417,11 +417,11 @@ public:
private:
struct ScopeExitx86ZeroUpper
{
~ScopeExitx86ZeroUpper()
FS_FORCEINLINE ~ScopeExitx86ZeroUpper()
{
if constexpr( SIMD & FeatureFlag::AVX )
{
_mm256_zeroupper();
FS_BIND_INTRINSIC( _mm256_zeroupper )();
}
}
};
Expand Down
8 changes: 4 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")

elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
if(MSVC)
target_compile_options(FastSIMD_FastNoise PRIVATE /GS- /fp:fast -mllvm -x86-use-vzeroupper=0)
target_compile_options(FastSIMD_FastNoise PRIVATE /GS- /fp:fast)
else()
target_compile_options(FastSIMD_FastNoise PRIVATE -ffast-math -fno-stack-protector -mllvm -x86-use-vzeroupper=0)
target_compile_options(FastSIMD_FastNoise PRIVATE -ffast-math -fno-stack-protector)
endif()

if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_compile_options(FastSIMD_FastNoise PRIVATE -fno-stack-protector -mno-vzeroupper)
target_compile_options(FastSIMD_FastNoise PRIVATE -mno-vzeroupper)
else()
target_compile_options(FastSIMD_FastNoise PRIVATE -fno-stack-protector -mllvm -x86-use-vzeroupper=0)
target_compile_options(FastSIMD_FastNoise PRIVATE -mllvm -x86-use-vzeroupper=0)
endif()

endif()
Expand Down

0 comments on commit 86f9cc8

Please sign in to comment.