Introduce platform-agnostic ALWAYS_INLINE macro

`<attributes.h>` has been included in anticipation of the following
commit.
This commit is contained in:
Hennadii Stepanov
2023-05-04 20:57:51 +01:00
parent 6c7ebcc14b
commit e16c22fe02
4 changed files with 12 additions and 0 deletions

View File

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

View File

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

View File

@@ -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};