mirror of
https://github.com/AxioDL/nod.git
synced 2025-12-08 21:17:51 +00:00
Windows build fixes and warning avoidance
This commit is contained in:
11
lib/aes.cpp
11
lib/aes.cpp
@@ -8,6 +8,10 @@
|
||||
#include <cpuid.h>
|
||||
#endif
|
||||
|
||||
#if __AES__ || (!defined(__clang__) && _MSC_VER >= 1800)
|
||||
#define _AES_NI 1
|
||||
#endif
|
||||
|
||||
namespace nod
|
||||
{
|
||||
|
||||
@@ -468,7 +472,7 @@ void SoftwareAES::encrypt(const uint8_t* iv, const uint8_t* inbuf, uint8_t* outb
|
||||
}
|
||||
}
|
||||
|
||||
#if __AES__ || _MSC_VER >= 1800
|
||||
#if _AES_NI
|
||||
|
||||
#include <wmmintrin.h>
|
||||
|
||||
@@ -583,12 +587,13 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
static int HAS_AES_NI = -1;
|
||||
|
||||
#endif
|
||||
|
||||
static int HAS_AES_NI = -1;
|
||||
std::unique_ptr<IAES> NewAES()
|
||||
{
|
||||
#if __AES__ || _MSC_VER >= 1800
|
||||
#if _AES_NI
|
||||
if (HAS_AES_NI == -1)
|
||||
{
|
||||
#if _MSC_VER
|
||||
|
||||
Reference in New Issue
Block a user