forked from wolfSSL/wolfssl
Fixes for using Keil with single precision math.
This commit is contained in:
@ -263,7 +263,7 @@ static int ed25519_sign_msg(const byte* in, word32 inLen, byte* out,
|
|||||||
int wc_ed25519_sign_msg(const byte* in, word32 inLen, byte* out,
|
int wc_ed25519_sign_msg(const byte* in, word32 inLen, byte* out,
|
||||||
word32 *outLen, ed25519_key* key)
|
word32 *outLen, ed25519_key* key)
|
||||||
{
|
{
|
||||||
return ed25519_sign_msg(in, inLen, out, outLen, key, Ed25519, NULL, 0);
|
return ed25519_sign_msg(in, inLen, out, outLen, key, (byte)Ed25519, NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -439,8 +439,8 @@ static int ed25519_verify_msg(const byte* sig, word32 sigLen, const byte* msg,
|
|||||||
int wc_ed25519_verify_msg(const byte* sig, word32 sigLen, const byte* msg,
|
int wc_ed25519_verify_msg(const byte* sig, word32 sigLen, const byte* msg,
|
||||||
word32 msgLen, int* res, ed25519_key* key)
|
word32 msgLen, int* res, ed25519_key* key)
|
||||||
{
|
{
|
||||||
return ed25519_verify_msg(sig, sigLen, msg, msgLen, res, key, Ed25519, NULL,
|
return ed25519_verify_msg(sig, sigLen, msg, msgLen, res, key, (byte)Ed25519,
|
||||||
0);
|
NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -50,6 +50,10 @@
|
|||||||
#define __asm__ asm
|
#define __asm__ asm
|
||||||
#define __volatile__ volatile
|
#define __volatile__ volatile
|
||||||
#endif /* __IAR_SYSTEMS_ICC__ */
|
#endif /* __IAR_SYSTEMS_ICC__ */
|
||||||
|
#ifdef __KEIL__
|
||||||
|
#define __asm__ __asm
|
||||||
|
#define __volatile__ volatile
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef WOLFSSL_SP_ARM_CORTEX_M_ASM
|
#ifdef WOLFSSL_SP_ARM_CORTEX_M_ASM
|
||||||
#if defined(WOLFSSL_HAVE_SP_RSA) || defined(WOLFSSL_HAVE_SP_DH)
|
#if defined(WOLFSSL_HAVE_SP_RSA) || defined(WOLFSSL_HAVE_SP_DH)
|
||||||
|
2
wolfssl/wolfcrypt/sp.h
Normal file → Executable file
2
wolfssl/wolfcrypt/sp.h
Normal file → Executable file
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
#define SP_NOINLINE __declspec(noinline)
|
#define SP_NOINLINE __declspec(noinline)
|
||||||
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__GNUC__)
|
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__GNUC__) || defined(__KEIL__)
|
||||||
#define SP_NOINLINE __attribute__((noinline))
|
#define SP_NOINLINE __attribute__((noinline))
|
||||||
#else
|
#else
|
||||||
#define SP_NOINLINE
|
#define SP_NOINLINE
|
||||||
|
@ -205,14 +205,17 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* GCC 7 has new switch() fall-through detection */
|
/* GCC 7 has new switch() fall-through detection */
|
||||||
|
/* default to FALL_THROUGH stub */
|
||||||
|
#ifndef FALL_THROUGH
|
||||||
|
#define FALL_THROUGH
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
#if ((__GNUC__ > 7) || ((__GNUC__ == 7) && (__GNUC_MINOR__ >= 1)))
|
#if ((__GNUC__ > 7) || ((__GNUC__ == 7) && (__GNUC_MINOR__ >= 1)))
|
||||||
#define FALL_THROUGH __attribute__ ((fallthrough))
|
#undef FALL_THROUGH
|
||||||
|
#define FALL_THROUGH __attribute__ ((fallthrough));
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifndef FALL_THROUGH
|
#endif /* FALL_THROUGH */
|
||||||
#define FALL_THROUGH
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Micrium will use Visual Studio for compilation but not the Win32 API */
|
/* Micrium will use Visual Studio for compilation but not the Win32 API */
|
||||||
#if defined(_WIN32) && !defined(MICRIUM) && !defined(FREERTOS) && \
|
#if defined(_WIN32) && !defined(MICRIUM) && !defined(FREERTOS) && \
|
||||||
|
Reference in New Issue
Block a user