Introduce platform-agnostic `ALWAYS_INLINE` macro

`<attributes.h>` has been included in anticipation of the following
commit.
pull/27575/head
Hennadii Stepanov 1 year ago
parent 6c7ebcc14b
commit e16c22fe02
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F

@ -16,4 +16,12 @@
# define LIFETIMEBOUND
#endif
#if defined(__GNUC__)
# define ALWAYS_INLINE inline __attribute__((always_inline))
#elif defined(_MSC_VER)
# define ALWAYS_INLINE __forceinline
#else
# error No known always_inline attribute for this platform.
#endif
#endif // BITCOIN_ATTRIBUTES_H

@ -7,6 +7,7 @@
#include <stdint.h>
#include <immintrin.h>
#include <attributes.h>
#include <crypto/common.h>
namespace sha256d64_avx2 {

@ -7,6 +7,7 @@
#include <stdint.h>
#include <immintrin.h>
#include <attributes.h>
#include <crypto/common.h>
namespace sha256d64_sse41 {

@ -11,6 +11,8 @@
#include <stdint.h>
#include <immintrin.h>
#include <attributes.h>
namespace {
alignas(__m128i) const uint8_t MASK[16] = {0x03, 0x02, 0x01, 0x00, 0x07, 0x06, 0x05, 0x04, 0x0b, 0x0a, 0x09, 0x08, 0x0f, 0x0e, 0x0d, 0x0c};

Loading…
Cancel
Save