mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-22 21:09:52 +00:00
fix ASAN error in Vec2<float>::Length()
This commit is contained in:
parent
c9d5b72683
commit
6e609342d6
@ -26,7 +26,8 @@ float Vec2<float>::Length() const
|
||||
// Doubt this is worth it for a vec2 :/
|
||||
#if defined(_M_SSE)
|
||||
float ret;
|
||||
__m128 xy = _mm_loadu_ps(&x);
|
||||
__m128d tmp = _mm_load_sd((const double*)&x);
|
||||
__m128 xy = _mm_castpd_ps(tmp);
|
||||
__m128 sq = _mm_mul_ps(xy, xy);
|
||||
const __m128 r2 = _mm_shuffle_ps(sq, sq, _MM_SHUFFLE(0, 0, 0, 1));
|
||||
const __m128 res = _mm_add_ss(sq, r2);
|
||||
|
Loading…
Reference in New Issue
Block a user