Skip to content

Conversation

@fanquake
Copy link
Member

We already use this in the blockfilter code,

#ifdef __SIZEOF_INT128__
return (static_cast<unsigned __int128>(x) * static_cast<unsigned __int128>(n)) >> 64;
#else

so not sure we need to maintain two different ways of testing
for the same functionality. Consolidate on testing for __SIZEOF_INT128__,
which we already use, is supported by the compilers we care about, and is
also used by libsecp256k1.

We already use this in the blockfilter code, so not sure we need to maintain two
different ways of testing for the same functionality. Consolidate on testing
for __SIZEOF_INT128__, which we already use, is supported by the compilers we
care about, and is also used by libsecp256k1.
Copy link
Contributor

@Zero-1729 Zero-1729 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

crACK e9440ae

Makes sense to consolidate, given it's already in use in the codebase.

@sipa
Copy link
Member

sipa commented Dec 13, 2021

utACK e9440ae

@maflcko maflcko merged commit 4279674 into bitcoin:master Dec 13, 2021
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Dec 13, 2021
…28 availability

e9440ae build: use __SIZEOF_INT128__ for checking __int128 availability (fanquake)

Pull request description:

  We already use this in the blockfilter code,

  https://github.com/bitcoin/bitcoin/blob/bf66e258a84e18935fde3ebb9a4b0392bf883222/src/blockfilter.cpp#L34-L36

  so not sure we need to maintain two different ways of testing
  for the same functionality. Consolidate on testing for `__SIZEOF_INT128__`,
  which we already use, is supported by the compilers we care about, and is
  also used by libsecp256k1.

ACKs for top commit:
  sipa:
    utACK e9440ae
  Zero-1729:
    crACK e9440ae

Tree-SHA512: 8aeef1734486a863b5091123bb5f9ba8868b1e2b4b35114586e3eb5862a38d4a1518ed069f37f41cb5e5ce2f6c87d95671996366d5ee990e0c90f268a8978ba3
@fanquake fanquake deleted the unify_int128_checking branch December 14, 2021 01:27
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Apr 28, 2022
…28 availability

e9440ae build: use __SIZEOF_INT128__ for checking __int128 availability (fanquake)

Pull request description:

  We already use this in the blockfilter code,

  https://github.com/bitcoin/bitcoin/blob/bf66e258a84e18935fde3ebb9a4b0392bf883222/src/blockfilter.cpp#L34-L36

  so not sure we need to maintain two different ways of testing
  for the same functionality. Consolidate on testing for `__SIZEOF_INT128__`,
  which we already use, is supported by the compilers we care about, and is
  also used by libsecp256k1.

ACKs for top commit:
  sipa:
    utACK e9440ae
  Zero-1729:
    crACK e9440ae

Tree-SHA512: 8aeef1734486a863b5091123bb5f9ba8868b1e2b4b35114586e3eb5862a38d4a1518ed069f37f41cb5e5ce2f6c87d95671996366d5ee990e0c90f268a8978ba3
@bitcoin bitcoin locked and limited conversation to collaborators Dec 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants