mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-08 13:43:33 +01:00
crypto/sha1: add real workaround for msvc/arm64 bad codegen
This commit is contained in:
parent
78142e30cc
commit
bf5076eb01
@ -136,6 +136,14 @@ add_library(common
|
|||||||
WorkQueueThread.h
|
WorkQueueThread.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(MSVC AND _M_ARM_64)
|
||||||
|
# Workaround msvc arm64 optimizer bug
|
||||||
|
# TODO remove after updating to VS 17.4
|
||||||
|
set_source_files_properties(
|
||||||
|
Crypto/SHA1.cpp
|
||||||
|
PROPERTIES COMPILE_FLAGS "/d2ssa-peeps-post-color-")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT MSVC AND _M_ARM_64)
|
if(NOT MSVC AND _M_ARM_64)
|
||||||
set_source_files_properties(
|
set_source_files_properties(
|
||||||
Crypto/AES.cpp
|
Crypto/AES.cpp
|
||||||
|
@ -293,10 +293,6 @@ private:
|
|||||||
template <size_t Func>
|
template <size_t Func>
|
||||||
static inline constexpr State FourRounds(State state, uint32x4_t w)
|
static inline constexpr State FourRounds(State state, uint32x4_t w)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
|
||||||
// FIXME it seems the msvc optimizer gets a little too happy
|
|
||||||
_ReadBarrier();
|
|
||||||
#endif
|
|
||||||
return {f<Func>(state, w), vsha1h_u32(vgetq_lane_u32(state.abcd, 0))};
|
return {f<Func>(state, w), vsha1h_u32(vgetq_lane_u32(state.abcd, 0))};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -723,7 +723,12 @@
|
|||||||
<ClCompile Include="Common\Crypto\AES.cpp" />
|
<ClCompile Include="Common\Crypto\AES.cpp" />
|
||||||
<ClCompile Include="Common\Crypto\bn.cpp" />
|
<ClCompile Include="Common\Crypto\bn.cpp" />
|
||||||
<ClCompile Include="Common\Crypto\ec.cpp" />
|
<ClCompile Include="Common\Crypto\ec.cpp" />
|
||||||
<ClCompile Include="Common\Crypto\SHA1.cpp" />
|
<ClCompile Include="Common\Crypto\SHA1.cpp">
|
||||||
|
<!--Workaround msvc arm64 optimizer bug
|
||||||
|
TODO remove after updating to VS 17.4
|
||||||
|
-->
|
||||||
|
<AdditionalOptions Condition="'$(Platform)'=='ARM64'">/d2ssa-peeps-post-color- %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="Common\Debug\MemoryPatches.cpp" />
|
<ClCompile Include="Common\Debug\MemoryPatches.cpp" />
|
||||||
<ClCompile Include="Common\Debug\Watches.cpp" />
|
<ClCompile Include="Common\Debug\Watches.cpp" />
|
||||||
<ClCompile Include="Common\DynamicLibrary.cpp" />
|
<ClCompile Include="Common\DynamicLibrary.cpp" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user