From b549bc351d804a65b22c4b2b7fc6e4a55ac96f06 Mon Sep 17 00:00:00 2001 From: senioi <42415346+senioi@users.noreply.github.com> Date: Mon, 6 Mar 2023 02:05:25 +0800 Subject: [PATCH 1/2] Update xxHash128.XXH.cs Check only x64 --- src/Standart.Hash.xxHash/xxHash128.XXH.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Standart.Hash.xxHash/xxHash128.XXH.cs b/src/Standart.Hash.xxHash/xxHash128.XXH.cs index c1bb5a7..8e076f3 100644 --- a/src/Standart.Hash.xxHash/xxHash128.XXH.cs +++ b/src/Standart.Hash.xxHash/xxHash128.XXH.cs @@ -97,7 +97,7 @@ private static ulong XXH_mult32to64(ulong x, ulong y) [MethodImpl(MethodImplOptions.AggressiveInlining)] private static uint128 XXH_mult64to128(ulong lhs, ulong rhs) { - if (Bmi2.IsSupported) + if (Bmi2.X64.IsSupported) return XXH_mult64to128_bmi2(lhs, rhs); return XXH_mult64to128_scalar(lhs, rhs); @@ -138,4 +138,4 @@ private static unsafe void XXH_writeLE64(byte* dst, ulong v64) *(ulong*) dst = v64; } } -} \ No newline at end of file +} From 7fd39b6497a2d3de07cbd407bfa6da6deb102b2e Mon Sep 17 00:00:00 2001 From: senioi <42415346+senioi@users.noreply.github.com> Date: Mon, 6 Mar 2023 02:06:45 +0800 Subject: [PATCH 2/2] Update xxHash3.XXH.cs Check only x64 --- src/Standart.Hash.xxHash/xxHash3.XXH.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Standart.Hash.xxHash/xxHash3.XXH.cs b/src/Standart.Hash.xxHash/xxHash3.XXH.cs index 71f210d..20234ab 100644 --- a/src/Standart.Hash.xxHash/xxHash3.XXH.cs +++ b/src/Standart.Hash.xxHash/xxHash3.XXH.cs @@ -96,7 +96,7 @@ private static unsafe void XXH_writeLE64(byte* dst, ulong v64) [MethodImpl(MethodImplOptions.AggressiveInlining)] private static uint128 XXH_mult64to128(ulong lhs, ulong rhs) { - if (Bmi2.IsSupported) + if (Bmi2.X64.IsSupported) return XXH_mult64to128_bmi2(lhs, rhs); return XXH_mult64to128_scalar(lhs, rhs); @@ -131,4 +131,4 @@ private static uint128 XXH_mult64to128_scalar(ulong lhs, ulong rhs) return r128; } } -} \ No newline at end of file +}