diff options
| author | Rye <rye@alchemyviewer.org> | 2025-10-27 02:55:56 -0400 |
|---|---|---|
| committer | Rye <rye@alchemyviewer.org> | 2025-10-27 04:59:16 -0400 |
| commit | e803bbc0db695abe73de9797510ba22646528e23 (patch) | |
| tree | a3aa818fa4768b40df9223fb5922aa27ac2a21a7 /indra/llmath/llvector4a.cpp | |
| parent | b1a96885492b65fe0636bf1184f5a8fbfe7b3930 (diff) | |
Modernize viewer alignment macros to use alignas and fix misaligned class issues reported by ubsan/asan
Signed-off-by: Rye <rye@alchemyviewer.org>
Diffstat (limited to 'indra/llmath/llvector4a.cpp')
| -rw-r--r-- | indra/llmath/llvector4a.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llmath/llvector4a.cpp b/indra/llmath/llvector4a.cpp index b81d50f0f9..6bdc97e420 100644 --- a/indra/llmath/llvector4a.cpp +++ b/indra/llmath/llvector4a.cpp @@ -101,7 +101,7 @@ void LLVector4a::quantize8( const LLVector4a& low, const LLVector4a& high ) // 8-bit quantization means we can do with just 12 bits of reciprocal accuracy const LLVector4a oneOverDelta = _mm_rcp_ps(delta.mQ); // { -// static LL_ALIGN_16( const F32 F_TWO_4A[4] ) = { 2.f, 2.f, 2.f, 2.f }; +// alignas(16) static const F32 F_TWO_4A[4] = { 2.f, 2.f, 2.f, 2.f }; // LLVector4a two; two.load4a( F_TWO_4A ); // // // Here we use _mm_rcp_ps plus one round of newton-raphson @@ -146,7 +146,7 @@ void LLVector4a::quantize16( const LLVector4a& low, const LLVector4a& high ) // 16-bit quantization means we need a round of Newton-Raphson LLVector4a oneOverDelta; { - static LL_ALIGN_16( const F32 F_TWO_4A[4] ) = { 2.f, 2.f, 2.f, 2.f }; + alignas(16) static const F32 F_TWO_4A[4] = { 2.f, 2.f, 2.f, 2.f }; ll_assert_aligned(F_TWO_4A,16); LLVector4a two; two.load4a( F_TWO_4A ); |
