Fixes for consistency in ASSERT_SAVED_VECTOR_REGISTERS and RESTORE_VECTOR_REGISTERS.

This commit is contained in:
David Garske
2024-11-01 14:24:30 -07:00
parent 99daac3974
commit 671f93135b
2 changed files with 3 additions and 4 deletions

View File

@ -449,7 +449,7 @@ WOLFSSL_LOCAL int wc_debug_CipherLifecycleFree(void **CipherLifecycleTag,
#endif #endif
#define ASSERT_SAVED_VECTOR_REGISTERS(fail_clause) do { \ #define ASSERT_SAVED_VECTOR_REGISTERS() do { \
if (wc_svr_count <= 0) { \ if (wc_svr_count <= 0) { \
fprintf(stderr, \ fprintf(stderr, \
("ASSERT_SAVED_VECTOR_REGISTERS : %s @ L%d : " \ ("ASSERT_SAVED_VECTOR_REGISTERS : %s @ L%d : " \
@ -460,7 +460,6 @@ WOLFSSL_LOCAL int wc_debug_CipherLifecycleFree(void **CipherLifecycleTag,
wc_svr_last_file, \ wc_svr_last_file, \
wc_svr_last_line); \ wc_svr_last_line); \
DEBUG_VECTOR_REGISTERS_EXTRA_FAIL_CLAUSE \ DEBUG_VECTOR_REGISTERS_EXTRA_FAIL_CLAUSE \
{ fail_clause } \
} \ } \
} while (0) } while (0)
#define ASSERT_RESTORED_VECTOR_REGISTERS(fail_clause) do { \ #define ASSERT_RESTORED_VECTOR_REGISTERS(fail_clause) do { \
@ -477,7 +476,7 @@ WOLFSSL_LOCAL int wc_debug_CipherLifecycleFree(void **CipherLifecycleTag,
{ fail_clause } \ { fail_clause } \
} \ } \
} while (0) } while (0)
#define RESTORE_VECTOR_REGISTERS(...) do { \ #define RESTORE_VECTOR_REGISTERS() do { \
--wc_svr_count; \ --wc_svr_count; \
if ((wc_svr_count > 4) || (wc_svr_count < 0)) { \ if ((wc_svr_count > 4) || (wc_svr_count < 0)) { \
fprintf(stderr, \ fprintf(stderr, \

View File

@ -1764,7 +1764,7 @@ typedef struct w64wrapper {
#define WC_DEBUG_SET_VECTOR_REGISTERS_RETVAL(x) WC_DO_NOTHING #define WC_DEBUG_SET_VECTOR_REGISTERS_RETVAL(x) WC_DO_NOTHING
#endif #endif
#ifndef ASSERT_SAVED_VECTOR_REGISTERS #ifndef ASSERT_SAVED_VECTOR_REGISTERS
#define ASSERT_SAVED_VECTOR_REGISTERS(fail_clause) WC_DO_NOTHING #define ASSERT_SAVED_VECTOR_REGISTERS() WC_DO_NOTHING
#endif #endif
#ifndef ASSERT_RESTORED_VECTOR_REGISTERS #ifndef ASSERT_RESTORED_VECTOR_REGISTERS
#define ASSERT_RESTORED_VECTOR_REGISTERS(fail_clause) WC_DO_NOTHING #define ASSERT_RESTORED_VECTOR_REGISTERS(fail_clause) WC_DO_NOTHING