Skip to content

Commit

Permalink
Delint.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Dec 5, 2024
1 parent 7fa9ec0 commit 99167b1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
5 changes: 3 additions & 2 deletions include/bitcoin/system/impl/hash/sha/algorithm_native.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ prepare(xint128_t& message0, xint128_t message1) NOEXCEPT

TEMPLATE
INLINE void CLASS::
prepare(xint128_t& message0, xint128_t message1, xint128_t& message2) NOEXCEPT
prepare(xint128_t& SHANI_ONLY(message0), xint128_t message1,
xint128_t& message2) NOEXCEPT
{
message2 = mm_sha256msg2_epu32(add<word_t>(message2,
message2 = mm_sha256msg2_epu32(mm_add_epi32(message2,
mm_alignr_epi8(message1, message0, 4)), message1);
}

Expand Down
11 changes: 6 additions & 5 deletions include/bitcoin/system/intrinsics/xcpu/defines.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,9 @@ BC_POP_WARNING()
#define mm_sha256msg1_epu32(a, b) (b)
#define mm_sha256msg2_epu32(a, b) (b)
#define mm_sha256rnds2_epu32(a, b, k) (k)

// supporting
#define mm_alignr_epi8(a, b, c) (b)
#define mm_blend_epi16(a, b, mask) (b)
#define mm_alignr_epi8(a, b, c) (a)
#define mm_blend_epi16(a, b, mask) (a)
#define SHANI_ONLY(a)
#else
#define mm_sha1msg1_epu32(a, b) _mm_sha1msg1_epu32(a, b)
#define mm_sha1msg2_epu32(a, b) _mm_sha1msg2_epu32(a, b)
Expand All @@ -341,10 +340,12 @@ BC_POP_WARNING()
#define mm_sha256msg2_epu32(a, b) _mm_sha256msg2_epu32(a, b)
#define mm_sha256rnds2_epu32(a, b, k) _mm_sha256rnds2_epu32(a, b, k)

// supporting
// supporting
#define mm_alignr_epi8(a, b, c) _mm_alignr_epi8(a, b, c)
#define mm_blend_epi16(a, b, mask) _mm_blend_epi16(a, b, mask)

// unused argument suppression
#define SHANI_ONLY(a) a
#endif

#endif
12 changes: 6 additions & 6 deletions include/bitcoin/system/intrinsics/xcpu/functional_128.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@ INLINE void store_aligned(xint128_t& bytes, xint128_t a) NOEXCEPT
using xint128_t = std_array<uint8_t, bytes<128>>;

template <typename Word, if_integral_integer<Word> = true>
INLINE xint128_t add(xint128_t, xint128_t) NOEXCEPT
INLINE xint128_t add(xint128_t, xint128_t b) NOEXCEPT
{
return {};
return b;
}

template <typename xWord, if_same<xWord, xint128_t> = true>
Expand All @@ -311,14 +311,14 @@ INLINE xint128_t set(uint32_t, uint32_t, uint32_t, uint32_t) NOEXCEPT
}

template <typename Word, if_integral_integer<Word> = true>
INLINE xint128_t byteswap(xint128_t) NOEXCEPT
INLINE xint128_t byteswap(xint128_t a) NOEXCEPT
{
return {};
return a;
}

INLINE xint128_t load(const xint128_t&) NOEXCEPT
INLINE xint128_t load(const xint128_t& a) NOEXCEPT
{
return {};
return a;
}

INLINE void store(xint128_t&, xint128_t) NOEXCEPT
Expand Down

0 comments on commit 99167b1

Please sign in to comment.