mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-19 18:15:18 -07:00
aarch64: set compiler attributes *after* including <arm_neon.h>
Fixes #1321
This commit is contained in:
parent
5391211b5d
commit
bb6e6a4b52
11
configure.ac
11
configure.ac
@ -397,11 +397,6 @@ AS_IF([test "x$EMSCRIPTEN" = "x"], [
|
||||
have_armcrypto=no
|
||||
AC_MSG_CHECKING(for ARM crypto instructions set)
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
#ifdef __clang__
|
||||
# pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function)
|
||||
#elif defined(__GNUC__)
|
||||
# pragma GCC target("+simd+crypto")
|
||||
#endif
|
||||
#ifndef __ARM_FEATURE_CRYPTO
|
||||
# define __ARM_FEATURE_CRYPTO 1
|
||||
#endif
|
||||
@ -410,6 +405,12 @@ AS_IF([test "x$EMSCRIPTEN" = "x"], [
|
||||
#endif
|
||||
|
||||
#include <arm_neon.h>
|
||||
|
||||
#ifdef __clang__
|
||||
# pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function)
|
||||
#elif defined(__GNUC__)
|
||||
# pragma GCC target("+simd+crypto")
|
||||
#endif
|
||||
]], [[
|
||||
int64x2_t x = { 0, 0 };
|
||||
vaeseq_u8(vmovq_n_u8(0), vmovq_n_u8(0));
|
||||
|
@ -17,12 +17,6 @@
|
||||
|
||||
#include "aegis128l_armcrypto.h"
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function)
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC target("+simd+crypto")
|
||||
#endif
|
||||
|
||||
#ifndef __ARM_FEATURE_CRYPTO
|
||||
#define __ARM_FEATURE_CRYPTO 1
|
||||
#endif
|
||||
@ -32,6 +26,12 @@
|
||||
|
||||
#include <arm_neon.h>
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function)
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC target("+simd+crypto")
|
||||
#endif
|
||||
|
||||
#define AES_BLOCK_LENGTH 16
|
||||
|
||||
typedef uint8x16_t aes_block_t;
|
||||
|
@ -17,12 +17,6 @@
|
||||
|
||||
#include "aegis256_armcrypto.h"
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function)
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC target("+simd+crypto")
|
||||
#endif
|
||||
|
||||
#ifndef __ARM_FEATURE_CRYPTO
|
||||
#define __ARM_FEATURE_CRYPTO 1
|
||||
#endif
|
||||
@ -32,6 +26,12 @@
|
||||
|
||||
#include <arm_neon.h>
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function)
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC target("+simd+crypto")
|
||||
#endif
|
||||
|
||||
#define AES_BLOCK_LENGTH 16
|
||||
|
||||
typedef uint8x16_t aes_block_t;
|
||||
|
@ -19,12 +19,6 @@
|
||||
#define __vectorcall
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function)
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC target("+simd+crypto")
|
||||
#endif
|
||||
|
||||
#ifndef __ARM_FEATURE_CRYPTO
|
||||
#define __ARM_FEATURE_CRYPTO 1
|
||||
#endif
|
||||
@ -34,6 +28,12 @@
|
||||
|
||||
#include <arm_neon.h>
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function)
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC target("+simd+crypto")
|
||||
#endif
|
||||
|
||||
#define ABYTES crypto_aead_aes256gcm_ABYTES
|
||||
#define NPUBBYTES crypto_aead_aes256gcm_NPUBBYTES
|
||||
#define KEYBYTES crypto_aead_aes256gcm_KEYBYTES
|
||||
|
Loading…
Reference in New Issue
Block a user