Skip to content

Commit

Permalink
sse: remove unbalanced HEDLEY_DIAGNOSTIC_PUSH
Browse files Browse the repository at this point in the history
Also cleanup some illegal double underscore variable names

Closes: #910
  • Loading branch information
mr-c committed May 4, 2023
1 parent b0b370a commit 02c7a67
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 72 deletions.
3 changes: 1 addition & 2 deletions simde-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -1092,10 +1092,9 @@ SIMDE_DIAGNOSTIC_DISABLE_CPP98_COMPAT_PEDANTIC_
HEDLEY_GCC_VERSION_CHECK(4,3,0)
# define SIMDE_BUG_IGNORE_SIGN_CONVERSION(expr) (__extension__ ({ \
HEDLEY_DIAGNOSTIC_PUSH \
HEDLEY_DIAGNOSTIC_POP \
_Pragma("GCC diagnostic ignored \"-Wsign-conversion\"") \
__typeof__(expr) simde_bug_ignore_sign_conversion_v_= (expr); \
HEDLEY_DIAGNOSTIC_PUSH \
HEDLEY_DIAGNOSTIC_POP \
simde_bug_ignore_sign_conversion_v_; \
}))
#else
Expand Down
6 changes: 3 additions & 3 deletions x86/avx.h
Original file line number Diff line number Diff line change
Expand Up @@ -2127,7 +2127,7 @@ simde_mm256_round_ps (simde__m256 a, const int rounding) {
#elif SIMDE_NATURAL_VECTOR_SIZE_LE(128) && defined(SIMDE_STATEMENT_EXPR_)
#define simde_mm256_round_ps(a, rounding) SIMDE_STATEMENT_EXPR_(({ \
simde__m256_private \
simde_mm256_round_ps_r_, \
simde_mm256_round_ps_r_ = simde__m256_to_private(simde_mm256_setzero_ps()), \
simde_mm256_round_ps_a_ = simde__m256_to_private(a); \
\
for (size_t simde_mm256_round_ps_i = 0 ; simde_mm256_round_ps_i < (sizeof(simde_mm256_round_ps_r_.m128) / sizeof(simde_mm256_round_ps_r_.m128[0])) ; simde_mm256_round_ps_i++) { \
Expand Down Expand Up @@ -2201,7 +2201,7 @@ simde_mm256_round_pd (simde__m256d a, const int rounding) {
#elif SIMDE_NATURAL_VECTOR_SIZE_LE(128) && defined(SIMDE_STATEMENT_EXPR_)
#define simde_mm256_round_pd(a, rounding) SIMDE_STATEMENT_EXPR_(({ \
simde__m256d_private \
simde_mm256_round_pd_r_, \
simde_mm256_round_pd_r_ = simde__m256d_to_private(simde_mm256_setzero_pd()), \
simde_mm256_round_pd_a_ = simde__m256d_to_private(a); \
\
for (size_t simde_mm256_round_pd_i = 0 ; simde_mm256_round_pd_i < (sizeof(simde_mm256_round_pd_r_.m128d) / sizeof(simde_mm256_round_pd_r_.m128d[0])) ; simde_mm256_round_pd_i++) { \
Expand Down Expand Up @@ -3093,7 +3093,7 @@ simde_mm256_cmp_ps
#elif defined(SIMDE_STATEMENT_EXPR_) && SIMDE_NATURAL_VECTOR_SIZE_LE(128)
#define simde_mm256_cmp_ps(a, b, imm8) SIMDE_STATEMENT_EXPR_(({ \
simde__m256_private \
simde_mm256_cmp_ps_r_, \
simde_mm256_cmp_ps_r_ = simde__m256_to_private(simde_mm256_setzero_ps()), \
simde_mm256_cmp_ps_a_ = simde__m256_to_private((a)), \
simde_mm256_cmp_ps_b_ = simde__m256_to_private((b)); \
\
Expand Down
18 changes: 9 additions & 9 deletions x86/avx2.h
Original file line number Diff line number Diff line change
Expand Up @@ -3989,11 +3989,11 @@ simde_mm256_shuffle_epi32 (simde__m256i a, const int imm8)
simde_mm_shuffle_epi32(simde_mm256_extracti128_si256(a, 0), (imm8)))
#elif defined(SIMDE_SHUFFLE_VECTOR_)
# define simde_mm256_shuffle_epi32(a, imm8) (__extension__ ({ \
const simde__m256i_private simde__tmp_a_ = simde__m256i_to_private(a); \
const simde__m256i_private simde_tmp_a_ = simde__m256i_to_private(a); \
simde__m256i_from_private((simde__m256i_private) { .i32 = \
SIMDE_SHUFFLE_VECTOR_(32, 32, \
(simde__tmp_a_).i32, \
(simde__tmp_a_).i32, \
(simde_tmp_a_).i32, \
(simde_tmp_a_).i32, \
((imm8) ) & 3, \
((imm8) >> 2) & 3, \
((imm8) >> 4) & 3, \
Expand All @@ -4017,11 +4017,11 @@ simde_mm256_shuffle_epi32 (simde__m256i a, const int imm8)
simde_mm_shufflehi_epi16(simde_mm256_extracti128_si256(a, 0), (imm8)))
#elif defined(SIMDE_SHUFFLE_VECTOR_)
# define simde_mm256_shufflehi_epi16(a, imm8) (__extension__ ({ \
const simde__m256i_private simde__tmp_a_ = simde__m256i_to_private(a); \
const simde__m256i_private simde_tmp_a_ = simde__m256i_to_private(a); \
simde__m256i_from_private((simde__m256i_private) { .i16 = \
SIMDE_SHUFFLE_VECTOR_(16, 32, \
(simde__tmp_a_).i16, \
(simde__tmp_a_).i16, \
(simde_tmp_a_).i16, \
(simde_tmp_a_).i16, \
0, 1, 2, 3, \
(((imm8) ) & 3) + 4, \
(((imm8) >> 2) & 3) + 4, \
Expand Down Expand Up @@ -4053,11 +4053,11 @@ simde_mm256_shuffle_epi32 (simde__m256i a, const int imm8)
simde_mm_shufflelo_epi16(simde_mm256_extracti128_si256(a, 0), (imm8)))
#elif defined(SIMDE_SHUFFLE_VECTOR_)
# define simde_mm256_shufflelo_epi16(a, imm8) (__extension__ ({ \
const simde__m256i_private simde__tmp_a_ = simde__m256i_to_private(a); \
const simde__m256i_private simde_tmp_a_ = simde__m256i_to_private(a); \
simde__m256i_from_private((simde__m256i_private) { .i16 = \
SIMDE_SHUFFLE_VECTOR_(16, 32, \
(simde__tmp_a_).i16, \
(simde__tmp_a_).i16, \
(simde_tmp_a_).i16, \
(simde_tmp_a_).i16, \
(((imm8) ) & 3), \
(((imm8) >> 2) & 3), \
(((imm8) >> 4) & 3), \
Expand Down
8 changes: 4 additions & 4 deletions x86/avx512/cmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ simde_mm512_cmp_ps_mask (simde__m512 a, simde__m512 b, const int imm8)
#elif defined(SIMDE_STATEMENT_EXPR_) && SIMDE_NATURAL_VECTOR_SIZE_LE(128)
#define simde_mm512_cmp_ps_mask(a, b, imm8) SIMDE_STATEMENT_EXPR_(({ \
simde__m512_private \
simde_mm512_cmp_ps_mask_r_, \
simde_mm512_cmp_ps_mask_r_ = simde__m512_to_private(simde_mm512_setzero_ps()), \
simde_mm512_cmp_ps_mask_a_ = simde__m512_to_private((a)), \
simde_mm512_cmp_ps_mask_b_ = simde__m512_to_private((b)); \
\
Expand All @@ -250,7 +250,7 @@ simde_mm512_cmp_ps_mask (simde__m512 a, simde__m512 b, const int imm8)
#elif defined(SIMDE_STATEMENT_EXPR_) && SIMDE_NATURAL_VECTOR_SIZE_LE(256)
#define simde_mm512_cmp_ps_mask(a, b, imm8) SIMDE_STATEMENT_EXPR_(({ \
simde__m512_private \
simde_mm512_cmp_ps_mask_r_, \
simde_mm512_cmp_ps_mask_r_ = simde__m512_to_private(simde_mm512_setzero_ps()), \
simde_mm512_cmp_ps_mask_a_ = simde__m512_to_private((a)), \
simde_mm512_cmp_ps_mask_b_ = simde__m512_to_private((b)); \
\
Expand Down Expand Up @@ -485,7 +485,7 @@ simde_mm512_cmp_pd_mask (simde__m512d a, simde__m512d b, const int imm8)
#elif defined(SIMDE_STATEMENT_EXPR_) && SIMDE_NATURAL_VECTOR_SIZE_LE(128)
#define simde_mm512_cmp_pd_mask(a, b, imm8) SIMDE_STATEMENT_EXPR_(({ \
simde__m512d_private \
simde_mm512_cmp_pd_mask_r_, \
simde_mm512_cmp_pd_mask_r_ = simde__m512d_to_private(simde_mm512_setzero_pd()), \
simde_mm512_cmp_pd_mask_a_ = simde__m512d_to_private((a)), \
simde_mm512_cmp_pd_mask_b_ = simde__m512d_to_private((b)); \
\
Expand All @@ -498,7 +498,7 @@ simde_mm512_cmp_pd_mask (simde__m512d a, simde__m512d b, const int imm8)
#elif defined(SIMDE_STATEMENT_EXPR_) && SIMDE_NATURAL_VECTOR_SIZE_LE(256)
#define simde_mm512_cmp_pd_mask(a, b, imm8) SIMDE_STATEMENT_EXPR_(({ \
simde__m512d_private \
simde_mm512_cmp_pd_mask_r_, \
simde_mm512_cmp_pd_mask_r_ = simde__m512d_to_private(simde_mm512_setzero_pd()), \
simde_mm512_cmp_pd_mask_a_ = simde__m512d_to_private((a)), \
simde_mm512_cmp_pd_mask_b_ = simde__m512d_to_private((b)); \
\
Expand Down
12 changes: 6 additions & 6 deletions x86/avx512/range.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ simde_mm256_range_ps (simde__m256 a, simde__m256 b, int imm8)
#elif SIMDE_NATURAL_VECTOR_SIZE_LE(128) && defined(SIMDE_STATEMENT_EXPR_)
#define simde_mm256_range_ps(a, b, imm8) SIMDE_STATEMENT_EXPR_(({ \
simde__m256_private \
simde_mm256_range_ps_r_, \
simde_mm256_range_ps_r_ = simde__m256_to_private(simde_mm256_setzero_ps()), \
simde_mm256_range_ps_a_ = simde__m256_to_private(a), \
simde_mm256_range_ps_b_ = simde__m256_to_private(b); \
\
Expand Down Expand Up @@ -208,7 +208,7 @@ simde_mm512_range_ps (simde__m512 a, simde__m512 b, int imm8)
#elif SIMDE_NATURAL_VECTOR_SIZE_LE(128) && defined(SIMDE_STATEMENT_EXPR_)
#define simde_mm512_range_ps(a, b, imm8) SIMDE_STATEMENT_EXPR_(({ \
simde__m512_private \
simde_mm512_range_ps_r_, \
simde_mm512_range_ps_r_ = simde__m512_to_private(simde_mm512_setzero_ps()), \
simde_mm512_range_ps_a_ = simde__m512_to_private(a), \
simde_mm512_range_ps_b_ = simde__m512_to_private(b); \
\
Expand All @@ -221,7 +221,7 @@ simde_mm512_range_ps (simde__m512 a, simde__m512 b, int imm8)
#elif SIMDE_NATURAL_VECTOR_SIZE_LE(256) && defined(SIMDE_STATEMENT_EXPR_)
#define simde_mm512_range_ps(a, b, imm8) SIMDE_STATEMENT_EXPR_(({ \
simde__m512_private \
simde_mm512_range_ps_r_, \
simde_mm512_range_ps_r_ = simde__m512_to_private(simde_mm512_setzero_ps()), \
simde_mm512_range_ps_a_ = simde__m512_to_private(a), \
simde_mm512_range_ps_b_ = simde__m512_to_private(b); \
\
Expand Down Expand Up @@ -368,7 +368,7 @@ simde_mm256_range_pd (simde__m256d a, simde__m256d b, int imm8)
#elif SIMDE_NATURAL_VECTOR_SIZE_LE(128) && defined(SIMDE_STATEMENT_EXPR_)
#define simde_mm256_range_pd(a, b, imm8) SIMDE_STATEMENT_EXPR_(({ \
simde__m256d_private \
simde_mm256_range_pd_r_, \
simde_mm256_range_pd_r_ = simde__m256d_to_private(simde_mm256_setzero_pd()), \
simde_mm256_range_pd_a_ = simde__m256d_to_private(a), \
simde_mm256_range_pd_b_ = simde__m256d_to_private(b); \
\
Expand Down Expand Up @@ -448,7 +448,7 @@ simde_mm512_range_pd (simde__m512d a, simde__m512d b, int imm8)
#elif SIMDE_NATURAL_VECTOR_SIZE_LE(128) && defined(SIMDE_STATEMENT_EXPR_)
#define simde_mm512_range_pd(a, b, imm8) SIMDE_STATEMENT_EXPR_(({ \
simde__m512d_private \
simde_mm512_range_pd_r_, \
simde_mm512_range_pd_r_ = simde__m512d_to_private(simde_mm512_setzero_pd()), \
simde_mm512_range_pd_a_ = simde__m512d_to_private(a), \
simde_mm512_range_pd_b_ = simde__m512d_to_private(b); \
\
Expand All @@ -461,7 +461,7 @@ simde_mm512_range_pd (simde__m512d a, simde__m512d b, int imm8)
#elif SIMDE_NATURAL_VECTOR_SIZE_LE(256) && defined(SIMDE_STATEMENT_EXPR_)
#define simde_mm512_range_pd(a, b, imm8) SIMDE_STATEMENT_EXPR_(({ \
simde__m512d_private \
simde_mm512_range_pd_r_, \
simde_mm512_range_pd_r_ = simde__m512d_to_private(simde_mm512_setzero_pd()), \
simde_mm512_range_pd_a_ = simde__m512d_to_private(a), \
simde_mm512_range_pd_b_ = simde__m512d_to_private(b); \
\
Expand Down
4 changes: 2 additions & 2 deletions x86/avx512/round.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SIMDE_BEGIN_DECLS_
#if SIMDE_NATURAL_VECTOR_SIZE_LE(256) && defined(SIMDE_STATEMENT_EXPR_)
#define simde_x_mm512_round_ps(a, rounding) SIMDE_STATEMENT_EXPR_(({ \
simde__m512_private \
simde_x_mm512_round_ps_r_, \
simde_x_mm512_round_ps_r_ = simde__m512_to_private(simde_mm512_setzero_ps()), \
simde_x_mm512_round_ps_a_ = simde__m512_to_private(a); \
\
for (size_t simde_x_mm512_round_ps_i = 0 ; simde_x_mm512_round_ps_i < (sizeof(simde_x_mm512_round_ps_r_.m256) / sizeof(simde_x_mm512_round_ps_r_.m256[0])) ; simde_x_mm512_round_ps_i++) { \
Expand Down Expand Up @@ -148,7 +148,7 @@ SIMDE_BEGIN_DECLS_
#if SIMDE_NATURAL_VECTOR_SIZE_LE(256) && defined(SIMDE_STATEMENT_EXPR_)
#define simde_x_mm512_round_pd(a, rounding) SIMDE_STATEMENT_EXPR_(({ \
simde__m512d_private \
simde_x_mm512_round_pd_r_, \
simde_x_mm512_round_pd_r_ = simde__m512d_to_private(simde_mm512_setzero_pd()), \
simde_x_mm512_round_pd_a_ = simde__m512d_to_private(a); \
\
for (size_t simde_x_mm512_round_pd_i = 0 ; simde_x_mm512_round_pd_i < (sizeof(simde_x_mm512_round_pd_r_.m256d) / sizeof(simde_x_mm512_round_pd_r_.m256d[0])) ; simde_x_mm512_round_pd_i++) { \
Expand Down
8 changes: 4 additions & 4 deletions x86/avx512/roundscale.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ SIMDE_BEGIN_DECLS_
#elif SIMDE_NATURAL_VECTOR_SIZE_LE(128) && defined(SIMDE_STATEMENT_EXPR_)
#define simde_mm256_roundscale_ps(a, imm8) SIMDE_STATEMENT_EXPR_(({ \
simde__m256_private \
simde_mm256_roundscale_ps_r_, \
simde_mm256_roundscale_ps_r_ = simde__m256_to_private(simde_mm256_setzero_ps()), \
simde_mm256_roundscale_ps_a_ = simde__m256_to_private(a); \
\
for (size_t simde_mm256_roundscale_ps_i = 0 ; simde_mm256_roundscale_ps_i < (sizeof(simde_mm256_roundscale_ps_r_.m128) / sizeof(simde_mm256_roundscale_ps_r_.m128[0])) ; simde_mm256_roundscale_ps_i++) { \
Expand Down Expand Up @@ -141,7 +141,7 @@ SIMDE_BEGIN_DECLS_
#elif SIMDE_NATURAL_VECTOR_SIZE_LE(256) && defined(SIMDE_STATEMENT_EXPR_)
#define simde_mm512_roundscale_ps(a, imm8) SIMDE_STATEMENT_EXPR_(({ \
simde__m512_private \
simde_mm512_roundscale_ps_r_, \
simde_mm512_roundscale_ps_r_ = simde__m512_to_private(simde_mm512_setzero_ps()), \
simde_mm512_roundscale_ps_a_ = simde__m512_to_private(a); \
\
for (size_t simde_mm512_roundscale_ps_i = 0 ; simde_mm512_roundscale_ps_i < (sizeof(simde_mm512_roundscale_ps_r_.m256) / sizeof(simde_mm512_roundscale_ps_r_.m256[0])) ; simde_mm512_roundscale_ps_i++) { \
Expand Down Expand Up @@ -265,7 +265,7 @@ SIMDE_BEGIN_DECLS_
#elif SIMDE_NATURAL_VECTOR_SIZE_LE(128) && defined(SIMDE_STATEMENT_EXPR_)
#define simde_mm256_roundscale_pd(a, imm8) SIMDE_STATEMENT_EXPR_(({ \
simde__m256d_private \
simde_mm256_roundscale_pd_r_, \
simde_mm256_roundscale_pd_r_ = simde__m256d_to_private(simde_mm256_setzero_pd()), \
simde_mm256_roundscale_pd_a_ = simde__m256d_to_private(a); \
\
for (size_t simde_mm256_roundscale_pd_i = 0 ; simde_mm256_roundscale_pd_i < (sizeof(simde_mm256_roundscale_pd_r_.m128d) / sizeof(simde_mm256_roundscale_pd_r_.m128d[0])) ; simde_mm256_roundscale_pd_i++) { \
Expand Down Expand Up @@ -333,7 +333,7 @@ SIMDE_BEGIN_DECLS_
#elif SIMDE_NATURAL_VECTOR_SIZE_LE(256) && defined(SIMDE_STATEMENT_EXPR_)
#define simde_mm512_roundscale_pd(a, imm8) SIMDE_STATEMENT_EXPR_(({ \
simde__m512d_private \
simde_mm512_roundscale_pd_r_, \
simde_mm512_roundscale_pd_r_ = simde__m512d_to_private(simde_mm512_setzero_pd()), \
simde_mm512_roundscale_pd_a_ = simde__m512d_to_private(a); \
\
for (size_t simde_mm512_roundscale_pd_i = 0 ; simde_mm512_roundscale_pd_i < (sizeof(simde_mm512_roundscale_pd_r_.m256d) / sizeof(simde_mm512_roundscale_pd_r_.m256d[0])) ; simde_mm512_roundscale_pd_i++) { \
Expand Down
11 changes: 3 additions & 8 deletions x86/sse.h
Original file line number Diff line number Diff line change
Expand Up @@ -3982,11 +3982,11 @@ simde_mm_sfence (void) {
# define simde_mm_shuffle_pi16(a, imm8) _mm_shuffle_pi16(a, imm8)
#elif defined(SIMDE_SHUFFLE_VECTOR_)
# define simde_mm_shuffle_pi16(a, imm8) (__extension__ ({ \
const simde__m64_private simde__tmp_a_ = simde__m64_to_private(a); \
const simde__m64_private simde_tmp_a_ = simde__m64_to_private(a); \
simde__m64_from_private((simde__m64_private) { .i16 = \
SIMDE_SHUFFLE_VECTOR_(16, 8, \
(simde__tmp_a_).i16, \
(simde__tmp_a_).i16, \
(simde_tmp_a_).i16, \
(simde_tmp_a_).i16, \
(((imm8) ) & 3), \
(((imm8) >> 2) & 3), \
(((imm8) >> 4) & 3), \
Expand Down Expand Up @@ -4592,11 +4592,6 @@ simde_mm_ucomineq_ss (simde__m128 a, simde__m128 b) {
# endif
#endif

#if defined(SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_)
HEDLEY_DIAGNOSTIC_PUSH
SIMDE_DIAGNOSTIC_DISABLE_UNINITIALIZED_
#endif

SIMDE_FUNCTION_ATTRIBUTES
simde__m128
simde_mm_unpackhi_ps (simde__m128 a, simde__m128 b) {
Expand Down
Loading

0 comments on commit 02c7a67

Please sign in to comment.