Latest libsodium-1.0.19-stable.tar.gz

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4622 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2023-11-08 23:17:32 +00:00
parent 699438602c
commit 5e8cd12760
15 changed files with 288 additions and 271 deletions

View File

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

View File

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

View File

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

View File

@ -228,7 +228,7 @@ xor_buf(unsigned char *out, const unsigned char *in, size_t n)
#ifdef _MSC_VER
# if defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86)
# if defined(_M_X64) || defined(_M_IX86)
# include <intrin.h>
# define HAVE_INTRIN_H 1

View File

@ -9,7 +9,7 @@
#if defined(HAVE_EMMINTRIN_H) && \
!(defined(__amd64) || defined(__amd64__) || defined(__x86_64__) || \
defined(_M_X64) || defined(_M_AMD64))
defined(_M_X64))
# include <emmintrin.h>
# include <stdint.h>

View File

@ -150,8 +150,7 @@ _sodium_runtime_arm_cpu_features(CPUFeatures * const cpu_features)
static void
_cpuid(unsigned int cpu_info[4U], const unsigned int cpu_info_type)
{
#if defined(_MSC_VER) && \
(defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86))
#if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86))
__cpuid((int *) cpu_info, cpu_info_type);
#elif defined(HAVE_CPUID)
cpu_info[0] = cpu_info[1] = cpu_info[2] = cpu_info[3] = 0;