diff --git a/include/QF/simd/types.h b/include/QF/simd/types.h index e056abfac..9badcc5f3 100644 --- a/include/QF/simd/types.h +++ b/include/QF/simd/types.h @@ -28,6 +28,8 @@ #ifndef __QF_simd_types_h #define __QF_simd_types_h +#include + #define VEC_TYPE(t,n) typedef t n __attribute__ ((vector_size (4*sizeof (t)))) /** Three element vector type for interfacing with compact data. @@ -51,7 +53,7 @@ VEC_TYPE (double, vec4d_t); /** Used mostly for __builtin_shuffle. */ -VEC_TYPE (long, vec4l_t); +VEC_TYPE (int64_t, vec4l_t); #endif /** Three element vector type for interfacing with compact data. diff --git a/include/QF/simd/vec4d.h b/include/QF/simd/vec4d.h index e73873bc0..93b0667c9 100644 --- a/include/QF/simd/vec4d.h +++ b/include/QF/simd/vec4d.h @@ -258,7 +258,8 @@ VISIBLE vec4d_t qconjd (vec4d_t q) { - const vec4l_t neg = { 1lu << 63, 1lu << 63, 1lu << 63, 0 }; + const uint64_t sign = UINT64_C(1) << 63; + const vec4l_t neg = { sign, sign, sign, 0 }; return _mm256_xor_pd (q, (__m256d) neg); } diff --git a/include/QF/simd/vec4f.h b/include/QF/simd/vec4f.h index 8fe207b74..4c76ba34b 100644 --- a/include/QF/simd/vec4f.h +++ b/include/QF/simd/vec4f.h @@ -91,8 +91,8 @@ GNU89INLINE inline vec4f_t qrotf (vec4f_t a, vec4f_t b) __attribute__((const)); * That is, [-x, -y, -z, w]. */ GNU89INLINE inline vec4f_t qconjf (vec4f_t q) __attribute__((const)); -GNU89INLINE inline vec4f_t loadvec3f (const float v3[3]) __attribute__((pure, access(read_only, 1))); -GNU89INLINE inline void storevec3f (float v3[3], vec4f_t v4) __attribute__((access (write_only, 1))); +GNU89INLINE inline vec4f_t loadvec3f (const float *v3) __attribute__((pure)); +GNU89INLINE inline void storevec3f (float *v3, vec4f_t v4); GNU89INLINE inline vec4f_t normalf (vec4f_t v) __attribute__((pure)); GNU89INLINE inline vec4f_t magnitudef (vec4f_t v) __attribute__((pure)); GNU89INLINE inline vec4f_t magnitude3f (vec4f_t v) __attribute__((pure));