Automatic detection of CPU capabilities

This commit is contained in:
tevador 2019-10-08 23:09:35 +02:00
parent eda3603bf3
commit e0484dfb99
8 changed files with 232 additions and 28 deletions

View file

@ -114,7 +114,6 @@
<ConformanceMode>true</ConformanceMode>
<AssemblerOutput>AssemblyCode</AssemblerOutput>
<PreprocessorDefinitions>_MBCS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
@ -132,7 +131,9 @@ SET ERRORLEVEL = 0</Command>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\allocator.cpp" />
<ClCompile Include="..\src\argon2_avx2.c" />
<ClCompile Include="..\src\argon2_avx2.c">
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
</ClCompile>
<ClCompile Include="..\src\argon2_core.c" />
<ClCompile Include="..\src\argon2_ref.c" />
<ClCompile Include="..\src\argon2_ssse3.c" />
@ -140,6 +141,7 @@ SET ERRORLEVEL = 0</Command>
<ClCompile Include="..\src\blake2_generator.cpp" />
<ClCompile Include="..\src\blake2\blake2b.c" />
<ClCompile Include="..\src\bytecode_machine.cpp" />
<ClCompile Include="..\src\cpu.cpp" />
<ClCompile Include="..\src\vm_compiled_light.cpp" />
<ClCompile Include="..\src\vm_compiled.cpp" />
<ClCompile Include="..\src\dataset.cpp" />
@ -173,6 +175,7 @@ SET ERRORLEVEL = 0</Command>
<ClInclude Include="..\src\blake2_generator.hpp" />
<ClInclude Include="..\src\bytecode_machine.hpp" />
<ClInclude Include="..\src\common.hpp" />
<ClInclude Include="..\src\cpu.hpp" />
<ClInclude Include="..\src\jit_compiler.hpp" />
<ClInclude Include="..\src\jit_compiler_a64.hpp" />
<ClInclude Include="..\src\jit_compiler_fallback.hpp" />

View file

@ -87,6 +87,9 @@
<ClCompile Include="..\src\argon2_ssse3.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\cpu.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\argon2.h">
@ -197,6 +200,9 @@
<ClInclude Include="..\src\blake2\blamka-round-ssse3.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\cpu.hpp">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<MASM Include="..\src\jit_compiler_x86_static.asm">