Skip to content

Commit

Permalink
Fix a type in SIMD port which the tests didn't catch (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
baconpaul authored Nov 1, 2024
1 parent aeeccbb commit 2615805
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions include/sst/waveshapers/Effects.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ inline SIMD_M128 SINUS_SSE2(QuadWaveshaperState *__restrict s, SIMD_M128 in, SIM
// GCC seems to optimize around the XMM -> int transfers so this is needed here
int e4 alignas(16)[4];
e4[0] = SIMD_MM(cvtsi128_si32)(e);
e4[1] = SIMD_MM(cvtsi128_si32)(SIMD_MM(shufflelo_epi16)(e, SIMDSIMD_MM_SHUFFLE(1, 1, 1, 1)));
e4[2] = SIMD_MM(cvtsi128_si32)(SIMD_MM(shufflelo_epi16)(e, SIMDSIMD_MM_SHUFFLE(2, 2, 2, 2)));
e4[3] = SIMD_MM(cvtsi128_si32)(SIMD_MM(shufflelo_epi16)(e, SIMDSIMD_MM_SHUFFLE(3, 3, 3, 3)));
e4[1] = SIMD_MM(cvtsi128_si32)(SIMD_MM(shufflelo_epi16)(e, SIMD_MM_SHUFFLE(1, 1, 1, 1)));
e4[2] = SIMD_MM(cvtsi128_si32)(SIMD_MM(shufflelo_epi16)(e, SIMD_MM_SHUFFLE(2, 2, 2, 2)));
e4[3] = SIMD_MM(cvtsi128_si32)(SIMD_MM(shufflelo_epi16)(e, SIMD_MM_SHUFFLE(3, 3, 3, 3)));
#else
// on PC write to memory & back as XMM -> GPR is slow on K8
short e4 alignas(16)[8];
Expand Down
6 changes: 3 additions & 3 deletions include/sst/waveshapers/WaveshaperLUT.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ SIMD_M128 WS_LUT(QuadWaveshaperState *__restrict, const float *table, SIMD_M128
// this should be very fast on C2D/C1D (and there are no macs with K8's)
int e4 alignas(16)[4];
e4[0] = SIMD_MM(cvtsi128_si32)(e);
e4[1] = SIMD_MM(cvtsi128_si32)(SIMD_MM(shufflelo_epi16)(e, SIMDSIMD_MM_SHUFFLE(1, 1, 1, 1)));
e4[2] = SIMD_MM(cvtsi128_si32)(SIMD_MM(shufflelo_epi16)(e, SIMDSIMD_MM_SHUFFLE(2, 2, 2, 2)));
e4[3] = SIMD_MM(cvtsi128_si32)(SIMD_MM(shufflelo_epi16)(e, SIMDSIMD_MM_SHUFFLE(3, 3, 3, 3)));
e4[1] = SIMD_MM(cvtsi128_si32)(SIMD_MM(shufflelo_epi16)(e, SIMD_MM_SHUFFLE(1, 1, 1, 1)));
e4[2] = SIMD_MM(cvtsi128_si32)(SIMD_MM(shufflelo_epi16)(e, SIMD_MM_SHUFFLE(2, 2, 2, 2)));
e4[3] = SIMD_MM(cvtsi128_si32)(SIMD_MM(shufflelo_epi16)(e, SIMD_MM_SHUFFLE(3, 3, 3, 3)));

#else
// on PC write to memory & back as XMM -> GPR is slow on K8
Expand Down

0 comments on commit 2615805

Please sign in to comment.