Add support for Intel C Compiler
This commit is contained in:
parent
2df204f8a8
commit
d2df34996b
3 changed files with 12 additions and 2 deletions
|
@ -70,4 +70,12 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
elseif (CMAKE_CXX_COMPILER_ID MATCHES Intel)
|
||||||
|
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
||||||
|
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -funroll-loops")
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fno-exceptions -fno-rtti")
|
||||||
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -funroll-loops")
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#if defined _MSC_VER || defined XMRIG_ARM
|
#if defined _MSC_VER || defined XMRIG_ARM || defined __INTEL_COMPILER
|
||||||
#define ABI_ATTRIBUTE
|
#define ABI_ATTRIBUTE
|
||||||
#else
|
#else
|
||||||
#define ABI_ATTRIBUTE __attribute__((ms_abi))
|
#define ABI_ATTRIBUTE __attribute__((ms_abi))
|
||||||
|
|
|
@ -446,8 +446,10 @@ static inline __m128i int_sqrt_v2(const uint64_t n0)
|
||||||
r >>= 19;
|
r >>= 19;
|
||||||
|
|
||||||
uint64_t x2 = (s - (1022ULL << 32)) * (r - s - (1022ULL << 32) + 1);
|
uint64_t x2 = (s - (1022ULL << 32)) * (r - s - (1022ULL << 32) + 1);
|
||||||
# if (defined(_MSC_VER) || __GNUC__ > 7 || (__GNUC__ == 7 && __GNUC_MINOR__ > 1)) && (defined(__x86_64__) || defined(_M_AMD64))
|
# if (defined(_MSC_VER) || __GNUC__ > 7 || (__GNUC__ == 7 && __GNUC_MINOR__ > 1)) && (defined(__x86_64__) || defined(_M_AMD64)) && !defined(__INTEL_COMPILER)
|
||||||
_addcarry_u64(_subborrow_u64(0, x2, n0, (unsigned long long int*)&x2), r, 0, (unsigned long long int*)&r);
|
_addcarry_u64(_subborrow_u64(0, x2, n0, (unsigned long long int*)&x2), r, 0, (unsigned long long int*)&r);
|
||||||
|
# elif defined(__INTEL_COMPILER)
|
||||||
|
_addcarry_u64(_subborrow_u64(0, x2, n0, (unsigned long int*)&x2), r, 0, (unsigned long int*)&r);
|
||||||
# else
|
# else
|
||||||
if (x2 < n0) ++r;
|
if (x2 < n0) ++r;
|
||||||
# endif
|
# endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue