Import Vector.hpp fix from Rack, before 2.2 update

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2022-11-25 18:16:45 +00:00
parent eb730b6c33
commit 7655bb5f0b
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0

View file

@ -359,12 +359,12 @@ inline Vector<int32_t, 4> operator~(const Vector<int32_t, 4>& a) {
/** `a << b` */
inline Vector<int32_t, 4> operator<<(const Vector<int32_t, 4>& a, const int& b) {
return Vector<int32_t, 4>(_mm_slli_epi32(a.v, b));
return Vector<int32_t, 4>(_mm_sll_epi32(a.v, _mm_cvtsi32_si128(b)));
}
/** `a >> b` */
inline Vector<int32_t, 4> operator>>(const Vector<int32_t, 4>& a, const int& b) {
return Vector<int32_t, 4>(_mm_srli_epi32(a.v, b));
return Vector<int32_t, 4>(_mm_srl_epi32(a.v, _mm_cvtsi32_si128(b)));
}