We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f5fc513 commit abbe82aCopy full SHA for abbe82a
2 files changed
src/ccan/ccan/compiler/compiler.h
@@ -228,4 +228,16 @@
228
#define WARN_UNUSED_RESULT
229
#endif
230
231
+
232
+/* ALIGNED - ensure a structure/variable is aligned to a given number of bytes
233
+ *
234
+ */
235
+#ifndef ALIGNED
236
+#if (defined(__clang__) || defined(__GNUC__))
237
+#define ALIGNED(N) __attribute__((aligned(N)))
238
+#else
239
+#define ALIGNED(N)
240
+#endif
241
+#endif /* ALIGNED */
242
243
#endif /* CCAN_COMPILER_H */
src/ccan/ccan/crypto/sha256/sha256_sse4.c
@@ -9,9 +9,6 @@
9
#include <stdlib.h>
10
11
#if defined(__x86_64__) || defined(__amd64__)
12
-/* TODO: Support alignment in compiler.h */
13
-#define ALIGNED(N) __attribute__((aligned(N)))
14
-
15
void TransformSSE4(uint32_t* s, const uint32_t* chunk, size_t blocks)
16
{
17
static const uint32_t K256[] ALIGNED(16) = {
0 commit comments