2020-05-22 13:18:41 +00:00
|
|
|
/*
|
2023-08-31 16:52:51 +00:00
|
|
|
* Copyright (c) 2013-2023, The PurpleI2P Project
|
2020-05-22 13:18:41 +00:00
|
|
|
*
|
|
|
|
* This file is part of Purple i2pd project and licensed under BSD3
|
|
|
|
*
|
|
|
|
* See full license text in LICENSE file at top of project tree
|
|
|
|
*/
|
|
|
|
|
2018-02-16 16:01:04 +00:00
|
|
|
#ifndef LIBI2PD_CPU_H
|
|
|
|
#define LIBI2PD_CPU_H
|
|
|
|
|
2023-09-17 18:33:42 +00:00
|
|
|
#if defined(_M_AMD64) || defined(__x86_64__) || defined(_M_IX86) || defined(__i386__)
|
|
|
|
# define IS_X86 1
|
|
|
|
# if defined(_M_AMD64) || defined(__x86_64__)
|
|
|
|
# define IS_X86_64 1
|
|
|
|
# else
|
|
|
|
# define IS_X86_64 0
|
|
|
|
# endif
|
|
|
|
#else
|
|
|
|
# define IS_X86 0
|
|
|
|
# define IS_X86_64 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__AES__) && !defined(_MSC_VER) && IS_X86
|
|
|
|
# define SUPPORTS_AES 1
|
|
|
|
#else
|
|
|
|
# define SUPPORTS_AES 0
|
|
|
|
#endif
|
|
|
|
|
2018-02-16 16:01:04 +00:00
|
|
|
namespace i2p
|
|
|
|
{
|
|
|
|
namespace cpu
|
|
|
|
{
|
2020-03-01 10:25:50 +00:00
|
|
|
extern bool aesni;
|
2018-02-16 16:01:04 +00:00
|
|
|
|
2023-08-31 16:52:51 +00:00
|
|
|
void Detect(bool AesSwitch, bool force);
|
2018-02-16 16:01:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|