From edbb86913b4b57ffb6a9194de4d52977f62999fe Mon Sep 17 00:00:00 2001 From: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com> Date: Thu, 26 Sep 2024 18:31:56 +0300 Subject: [PATCH] Disable buffer overrun checks. --- PowerSample/CMakeLists.txt | 1 + PowerUtils/ppc_context.h | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/PowerSample/CMakeLists.txt b/PowerSample/CMakeLists.txt index 7f99324..af912b9 100644 --- a/PowerSample/CMakeLists.txt +++ b/PowerSample/CMakeLists.txt @@ -2,6 +2,7 @@ project("PowerSample") add_compile_options( "/fp:strict" + "/GS-" "-march=x86-64-v3" "-fno-strict-aliasing") diff --git a/PowerUtils/ppc_context.h b/PowerUtils/ppc_context.h index 0dbda22..ef02bb8 100644 --- a/PowerUtils/ppc_context.h +++ b/PowerUtils/ppc_context.h @@ -160,19 +160,19 @@ struct PPCFPSCRRegister static constexpr size_t FlushMask = _MM_FLUSH_ZERO_MASK | _MM_DENORMALS_ZERO_MASK; - inline void enableFlushModeUnconditional() + inline void enableFlushModeUnconditional() noexcept { csr |= FlushMask; _mm_setcsr(csr); } - inline void disableFlushModeUnconditional() + inline void disableFlushModeUnconditional() noexcept { csr &= ~FlushMask; _mm_setcsr(csr); } - inline void enableFlushMode() + inline void enableFlushMode() noexcept { if ((csr & FlushMask) != FlushMask) [[unlikely]] { @@ -181,7 +181,7 @@ struct PPCFPSCRRegister } } - inline void disableFlushMode() + inline void disableFlushMode() noexcept { if ((csr & FlushMask) != 0) [[unlikely]] {