Skip to content

Commit f4817b6

Browse files
committed
e2k: Deal with deprecated inefficient functions of lcc
1 parent a46b197 commit f4817b6

File tree

4 files changed

+27
-6
lines changed

4 files changed

+27
-6
lines changed

simde/simde-arch.h

+10-1
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,15 @@
191191
#define SIMDE_BUG_LCC_WARNING_ON_SHIFTS
192192
#define SIMDE_BUG_LCC_XOP_MISSING
193193
#define SIMDE_BUG_LCC_FMA_WRONG_RESULT
194+
195+
/* May be defined to avoid usage of these functions.
196+
* These functions are:
197+
* _mm_clmulepi64_si128 (clmul.h)
198+
* _mm_permute2_ps (xop.h)
199+
* _mm_permute2_pd (xop.h)
200+
* _mm256_permute2_ps (xop.h)
201+
* _mm256_permute2_pd (xop.h)
202+
#define SIMDE_LCC_DISABLE_INEFFICIENT_FUNCTIONS */
194203
#endif
195204

196205
/* HP/PA / PA-RISC
@@ -317,7 +326,7 @@
317326
# if defined(__GFNI__)
318327
# define SIMDE_ARCH_X86_GFNI 1
319328
# endif
320-
# if defined(__PCLMUL__) && !defined(SIMDE_ARCH_E2K) /* E2K has inefficient implementation of PCLMUL */
329+
# if defined(__PCLMUL__)
321330
# define SIMDE_ARCH_X86_PCLMUL 1
322331
# endif
323332
# if defined(__VPCLMULQDQ__)

simde/simde-diagnostic.h

+6
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,12 @@
229229
#define SIMDE_DIAGNOSTIC_DISABLE_USED_BUT_MARKED_UNUSED_
230230
#endif
231231

232+
#if defined(__LCC__)
233+
#define SIMDE_DIAGNOSTIC_DISABLE_LCC_DEPRECATED_FUNCTION_ _Pragma("diag_suppress 1444")
234+
#else
235+
#define SIMDE_DIAGNOSTIC_DISABLE_LCC_DEPRECATED_FUNCTION_
236+
#endif
237+
232238
#if defined(__LCC__)
233239
#define SIMDE_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION_ _Pragma("diag_suppress 3142")
234240
#elif HEDLEY_HAS_WARNING("-Wunused-function")

simde/x86/clmul.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242

4343
HEDLEY_DIAGNOSTIC_PUSH
4444
SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
45+
#if defined(__LCC__) && !defined(SIMDE_LCC_DISABLE_INEFFICIENT_FUNCTIONS)
46+
SIMDE_DIAGNOSTIC_DISABLE_LCC_DEPRECATED_FUNCTION_
47+
#endif
4548
SIMDE_BEGIN_DECLS_
4649

4750
SIMDE_FUNCTION_ATTRIBUTES
@@ -203,7 +206,7 @@ simde_mm_clmulepi64_si128 (simde__m128i a, simde__m128i b, const int imm8)
203206

204207
return simde__m128i_from_private(r_);
205208
}
206-
#if defined(SIMDE_X86_PCLMUL_NATIVE)
209+
#if defined(SIMDE_X86_PCLMUL_NATIVE) && !defined(SIMDE_LCC_DISABLE_INEFFICIENT_FUNCTIONS)
207210
#define simde_mm_clmulepi64_si128(a, b, imm8) _mm_clmulepi64_si128(a, b, imm8)
208211
#elif defined(SIMDE_ARM_NEON_A64V8_NATIVE) && defined(__ARM_FEATURE_AES)
209212
#define simde_mm_clmulepi64_si128(a, b, imm8) \

simde/x86/xop.h

+7-4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535

3636
HEDLEY_DIAGNOSTIC_PUSH
3737
SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
38+
#if defined(__LCC__) && !defined(SIMDE_LCC_DISABLE_INEFFICIENT_FUNCTIONS)
39+
SIMDE_DIAGNOSTIC_DISABLE_LCC_DEPRECATED_FUNCTION_
40+
#endif
3841
SIMDE_BEGIN_DECLS_
3942

4043
SIMDE_FUNCTION_ATTRIBUTES
@@ -3511,7 +3514,7 @@ simde_mm_permute2_ps (simde__m128 a, simde__m128 b, simde__m128i c, const int im
35113514

35123515
return simde__m128_from_private(r_);
35133516
}
3514-
#if defined(SIMDE_X86_XOP_NATIVE)
3517+
#if defined(SIMDE_X86_XOP_NATIVE) && !defined(SIMDE_LCC_DISABLE_INEFFICIENT_FUNCTIONS)
35153518
#define simde_mm_permute2_ps(a, b, c, imm8) _mm_permute2_ps((a), (b), (c), (imm8))
35163519
#endif
35173520
#if defined(SIMDE_X86_XOP_ENABLE_NATIVE_ALIASES)
@@ -3547,7 +3550,7 @@ simde_mm_permute2_pd (simde__m128d a, simde__m128d b, simde__m128i c, const int
35473550

35483551
return simde__m128d_from_private(r_);
35493552
}
3550-
#if defined(SIMDE_X86_XOP_NATIVE)
3553+
#if defined(SIMDE_X86_XOP_NATIVE) && !defined(SIMDE_LCC_DISABLE_INEFFICIENT_FUNCTIONS)
35513554
#define simde_mm_permute2_pd(a, b, c, imm8) _mm_permute2_pd((a), (b), (c), (imm8))
35523555
#endif
35533556
#if defined(SIMDE_X86_XOP_ENABLE_NATIVE_ALIASES)
@@ -3589,7 +3592,7 @@ simde_mm256_permute2_ps (simde__m256 a, simde__m256 b, simde__m256i c, const int
35893592

35903593
return simde__m256_from_private(r_);
35913594
}
3592-
#if defined(SIMDE_X86_XOP_NATIVE)
3595+
#if defined(SIMDE_X86_XOP_NATIVE) && !defined(SIMDE_LCC_DISABLE_INEFFICIENT_FUNCTIONS)
35933596
#define simde_mm256_permute2_ps(a, b, c, imm8) _mm256_permute2_ps((a), (b), (c), (imm8))
35943597
#endif
35953598
#if defined(SIMDE_X86_XOP_ENABLE_NATIVE_ALIASES)
@@ -3631,7 +3634,7 @@ simde_mm256_permute2_pd (simde__m256d a, simde__m256d b, simde__m256i c, const i
36313634

36323635
return simde__m256d_from_private(r_);
36333636
}
3634-
#if defined(SIMDE_X86_XOP_NATIVE)
3637+
#if defined(SIMDE_X86_XOP_NATIVE) && !defined(SIMDE_LCC_DISABLE_INEFFICIENT_FUNCTIONS)
36353638
#define simde_mm256_permute2_pd(a, b, c, imm8) _mm256_permute2_pd((a), (b), (c), (imm8))
36363639
#endif
36373640
#if defined(SIMDE_X86_XOP_ENABLE_NATIVE_ALIASES)

0 commit comments

Comments
 (0)