mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-21 14:34:49 +01:00
Introduce platform-agnostic ALWAYS_INLINE
macro
`<attributes.h>` has been included in anticipation of the following commit.
This commit is contained in:
parent
6c7ebcc14b
commit
e16c22fe02
4 changed files with 12 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue