Skip to content

Commit

Permalink
Improvement for SAVE_VECTOR_REGISTERS
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarske committed Nov 1, 2024
1 parent 84b5d66 commit 99daac3
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion wolfcrypt/src/curve25519.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#if defined(WOLFSSL_LINUXKM) && !defined(USE_INTEL_SPEEDUP)
/* force off unneeded vector register save/restore. */
#undef SAVE_VECTOR_REGISTERS
#define SAVE_VECTOR_REGISTERS(...) WC_DO_NOTHING
#define SAVE_VECTOR_REGISTERS(fail_clause) WC_DO_NOTHING
#undef RESTORE_VECTOR_REGISTERS
#define RESTORE_VECTOR_REGISTERS() WC_DO_NOTHING
#endif
Expand Down
2 changes: 1 addition & 1 deletion wolfcrypt/src/dh.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
#if defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_SP_ASM)
/* force off unneeded vector register save/restore. */
#undef SAVE_VECTOR_REGISTERS
#define SAVE_VECTOR_REGISTERS(...) WC_DO_NOTHING
#define SAVE_VECTOR_REGISTERS(fail_clause) WC_DO_NOTHING
#undef RESTORE_VECTOR_REGISTERS
#define RESTORE_VECTOR_REGISTERS() WC_DO_NOTHING
#endif
Expand Down
2 changes: 1 addition & 1 deletion wolfcrypt/src/dsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#if defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_SP_ASM)
/* force off unneeded vector register save/restore. */
#undef SAVE_VECTOR_REGISTERS
#define SAVE_VECTOR_REGISTERS(...) WC_DO_NOTHING
#define SAVE_VECTOR_REGISTERS(fail_clause) WC_DO_NOTHING
#undef RESTORE_VECTOR_REGISTERS
#define RESTORE_VECTOR_REGISTERS() WC_DO_NOTHING
#endif
Expand Down
2 changes: 1 addition & 1 deletion wolfcrypt/src/ecc.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ ECC Curve Sizes:
#if defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_SP_ASM)
/* force off unneeded vector register save/restore. */
#undef SAVE_VECTOR_REGISTERS
#define SAVE_VECTOR_REGISTERS(...) WC_DO_NOTHING
#define SAVE_VECTOR_REGISTERS(fail_clause) WC_DO_NOTHING
#undef RESTORE_VECTOR_REGISTERS
#define RESTORE_VECTOR_REGISTERS() WC_DO_NOTHING
#endif
Expand Down
2 changes: 1 addition & 1 deletion wolfcrypt/src/eccsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#if defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_SP_ASM)
/* force off unneeded vector register save/restore. */
#undef SAVE_VECTOR_REGISTERS
#define SAVE_VECTOR_REGISTERS(...) WC_DO_NOTHING
#define SAVE_VECTOR_REGISTERS(fail_clause) WC_DO_NOTHING
#undef RESTORE_VECTOR_REGISTERS
#define RESTORE_VECTOR_REGISTERS() WC_DO_NOTHING
#endif
Expand Down
2 changes: 1 addition & 1 deletion wolfcrypt/src/rsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ RSA keys can be used to encrypt, decrypt, sign and verify data.
#if defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_SP_ASM)
/* force off unneeded vector register save/restore. */
#undef SAVE_VECTOR_REGISTERS
#define SAVE_VECTOR_REGISTERS(...) WC_DO_NOTHING
#define SAVE_VECTOR_REGISTERS(fail_clause) WC_DO_NOTHING
#undef RESTORE_VECTOR_REGISTERS
#define RESTORE_VECTOR_REGISTERS() WC_DO_NOTHING
#endif
Expand Down
2 changes: 1 addition & 1 deletion wolfcrypt/src/sakke.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#if defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_SP_ASM)
/* force off unneeded vector register save/restore. */
#undef SAVE_VECTOR_REGISTERS
#define SAVE_VECTOR_REGISTERS(...) WC_DO_NOTHING
#define SAVE_VECTOR_REGISTERS(fail_clause) WC_DO_NOTHING
#undef RESTORE_VECTOR_REGISTERS
#define RESTORE_VECTOR_REGISTERS() WC_DO_NOTHING
#endif
Expand Down
2 changes: 1 addition & 1 deletion wolfcrypt/src/sp_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ This library provides single precision (SP) integer math functions.
#if defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_SP_ASM)
/* force off unneeded vector register save/restore. */
#undef SAVE_VECTOR_REGISTERS
#define SAVE_VECTOR_REGISTERS(...) WC_DO_NOTHING
#define SAVE_VECTOR_REGISTERS(fail_clause) WC_DO_NOTHING
#undef RESTORE_VECTOR_REGISTERS
#define RESTORE_VECTOR_REGISTERS() WC_DO_NOTHING
#endif
Expand Down
10 changes: 3 additions & 7 deletions wolfssl/wolfcrypt/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -1750,11 +1750,7 @@ typedef struct w64wrapper {
#endif

#ifndef SAVE_VECTOR_REGISTERS
#ifdef __WATCOMC__
#define SAVE_VECTOR_REGISTERS() WC_DO_NOTHING
#else
#define SAVE_VECTOR_REGISTERS(...) WC_DO_NOTHING
#endif
#define SAVE_VECTOR_REGISTERS(fail_clause) WC_DO_NOTHING
#endif
#ifndef SAVE_VECTOR_REGISTERS2
#define SAVE_VECTOR_REGISTERS2() 0
Expand All @@ -1768,10 +1764,10 @@ typedef struct w64wrapper {
#define WC_DEBUG_SET_VECTOR_REGISTERS_RETVAL(x) WC_DO_NOTHING
#endif
#ifndef ASSERT_SAVED_VECTOR_REGISTERS
#define ASSERT_SAVED_VECTOR_REGISTERS(...) WC_DO_NOTHING
#define ASSERT_SAVED_VECTOR_REGISTERS(fail_clause) WC_DO_NOTHING
#endif
#ifndef ASSERT_RESTORED_VECTOR_REGISTERS
#define ASSERT_RESTORED_VECTOR_REGISTERS(...) WC_DO_NOTHING
#define ASSERT_RESTORED_VECTOR_REGISTERS(fail_clause) WC_DO_NOTHING
#endif
#ifndef RESTORE_VECTOR_REGISTERS
#define RESTORE_VECTOR_REGISTERS() WC_DO_NOTHING
Expand Down

0 comments on commit 99daac3

Please sign in to comment.