diff options
Diffstat (limited to 'crypto/src/math')
-rw-r--r-- | crypto/src/math/BigInteger.cs | 6 | ||||
-rw-r--r-- | crypto/src/math/ec/custom/sec/SecT571Field.cs | 4 | ||||
-rw-r--r-- | crypto/src/math/raw/Interleave.cs | 14 |
3 files changed, 12 insertions, 12 deletions
diff --git a/crypto/src/math/BigInteger.cs b/crypto/src/math/BigInteger.cs index f915beafc..d6c43cdc0 100644 --- a/crypto/src/math/BigInteger.cs +++ b/crypto/src/math/BigInteger.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; -#if NET5_0_OR_GREATER +#if NETCOREAPP3_0_OR_GREATER using System.Runtime.Intrinsics.X86; #endif using System.Runtime.Serialization; @@ -894,7 +894,7 @@ namespace Org.BouncyCastle.Math public static int BitCnt(int i) { -#if NET5_0_OR_GREATER +#if NETCOREAPP3_0_OR_GREATER if (Popcnt.IsSupported) { return (int)Popcnt.PopCount((uint)i); @@ -968,7 +968,7 @@ namespace Org.BouncyCastle.Math // private static int BitLen(int w) { -#if NET5_0_OR_GREATER +#if NETCOREAPP3_0_OR_GREATER if (Lzcnt.IsSupported) { return 32 - (int)Lzcnt.LeadingZeroCount((uint)w); diff --git a/crypto/src/math/ec/custom/sec/SecT571Field.cs b/crypto/src/math/ec/custom/sec/SecT571Field.cs index 97bc08d67..91a3fde9d 100644 --- a/crypto/src/math/ec/custom/sec/SecT571Field.cs +++ b/crypto/src/math/ec/custom/sec/SecT571Field.cs @@ -1,6 +1,6 @@ using System; using System.Diagnostics; -#if NET5_0_OR_GREATER +#if NETCOREAPP3_0_OR_GREATER using System.Runtime.Intrinsics; using System.Runtime.Intrinsics.X86; #endif @@ -403,7 +403,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec protected static void ImplMulwAcc(ulong[] u, ulong x, ulong y, ulong[] z, int zOff) { -#if NET5_0_OR_GREATER +#if NETCOREAPP3_0_OR_GREATER if (Pclmulqdq.IsSupported) { var X = Vector128.CreateScalar(x); diff --git a/crypto/src/math/raw/Interleave.cs b/crypto/src/math/raw/Interleave.cs index 560fd76fb..a71b4a1b8 100644 --- a/crypto/src/math/raw/Interleave.cs +++ b/crypto/src/math/raw/Interleave.cs @@ -1,5 +1,5 @@ using System; -#if NET5_0_OR_GREATER +#if NETCOREAPP3_0_OR_GREATER using System.Runtime.Intrinsics.X86; #endif @@ -32,7 +32,7 @@ namespace Org.BouncyCastle.Math.Raw internal static ulong Expand32to64(uint x) { -#if NET5_0_OR_GREATER +#if NETCOREAPP3_0_OR_GREATER if (Bmi2.IsSupported) { return (ulong)Bmi2.ParallelBitDeposit(x >> 16, 0x55555555U) << 32 @@ -51,7 +51,7 @@ namespace Org.BouncyCastle.Math.Raw internal static void Expand64To128(ulong x, ulong[] z, int zOff) { -#if NET5_0_OR_GREATER +#if NETCOREAPP3_0_OR_GREATER if (Bmi2.X64.IsSupported) { z[zOff ] = Bmi2.X64.ParallelBitDeposit(x , 0x5555555555555555UL); @@ -92,7 +92,7 @@ namespace Org.BouncyCastle.Math.Raw internal static void Expand64To128Rev(ulong x, ulong[] z, int zOff) { -#if NET5_0_OR_GREATER +#if NETCOREAPP3_0_OR_GREATER if (Bmi2.X64.IsSupported) { z[zOff ] = Bmi2.X64.ParallelBitDeposit(x >> 32, 0xAAAAAAAAAAAAAAAAUL); @@ -155,7 +155,7 @@ namespace Org.BouncyCastle.Math.Raw internal static ulong Unshuffle(ulong x) { -#if NET5_0_OR_GREATER +#if NETCOREAPP3_0_OR_GREATER if (Bmi2.X64.IsSupported) { return Bmi2.X64.ParallelBitExtract(x, 0xAAAAAAAAAAAAAAAAUL) << 32 @@ -174,7 +174,7 @@ namespace Org.BouncyCastle.Math.Raw internal static ulong Unshuffle(ulong x, out ulong even) { -#if NET5_0_OR_GREATER +#if NETCOREAPP3_0_OR_GREATER if (Bmi2.X64.IsSupported) { even = Bmi2.X64.ParallelBitExtract(x, 0x5555555555555555UL); @@ -189,7 +189,7 @@ namespace Org.BouncyCastle.Math.Raw internal static ulong Unshuffle(ulong x0, ulong x1, out ulong even) { -#if NET5_0_OR_GREATER +#if NETCOREAPP3_0_OR_GREATER if (Bmi2.X64.IsSupported) { even = Bmi2.X64.ParallelBitExtract(x0, 0x5555555555555555UL) |