mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-23 06:35:49 -07:00
Fix internal.h
This commit is contained in:
parent
d64afb7a1f
commit
d11221d7fa
1 changed files with 12 additions and 3 deletions
|
@ -132,6 +132,13 @@
|
||||||
#pragma intrinsic(_umul128)
|
#pragma intrinsic(_umul128)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(OPENSSL_AARCH64) && defined(_MSC_VER) && ! defined(__clang__)
|
||||||
|
#pragma warning(push, 3)
|
||||||
|
#include <intrin.h>
|
||||||
|
#pragma warning(pop)
|
||||||
|
#pragma intrinsic(_umul128)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "../../internal.h"
|
#include "../../internal.h"
|
||||||
|
|
||||||
typedef crypto_word BN_ULONG;
|
typedef crypto_word BN_ULONG;
|
||||||
|
@ -187,6 +194,8 @@ static inline void bn_umult_lohi(BN_ULONG *low_out, BN_ULONG *high_out,
|
||||||
BN_ULONG a, BN_ULONG b) {
|
BN_ULONG a, BN_ULONG b) {
|
||||||
#if defined(OPENSSL_X86_64) && defined(_MSC_VER) && !defined(__clang__)
|
#if defined(OPENSSL_X86_64) && defined(_MSC_VER) && !defined(__clang__)
|
||||||
*low_out = _umul128(a, b, high_out);
|
*low_out = _umul128(a, b, high_out);
|
||||||
|
#elif defined(OPENSSL_AARCH64) && defined(_MSC_VER) && ! defined(__clang__)
|
||||||
|
*low_out = _umul128(a, b, high_out);
|
||||||
#else
|
#else
|
||||||
BN_ULLONG result = (BN_ULLONG)a * b;
|
BN_ULLONG result = (BN_ULLONG)a * b;
|
||||||
*low_out = (BN_ULONG)result;
|
*low_out = (BN_ULONG)result;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue