Tell the compiler that v4f is aligned
It's guaranteed that this is now aligned on a 16-byte boundary.
This commit is contained in:
parent
5ef9c84f97
commit
e7faebf6af
10
configure.ac
10
configure.ac
@ -272,7 +272,7 @@ AM_GLIB_GNU_GETTEXT
|
|||||||
# [ax_gcc_version_option=yes],
|
# [ax_gcc_version_option=yes],
|
||||||
# [ax_gcc_version_option=no]
|
# [ax_gcc_version_option=no]
|
||||||
# )
|
# )
|
||||||
AC_MSG_CHECKING([for gcc version])
|
AC_MSG_CHECKING([for $CC version])
|
||||||
GCC_VERSION=""
|
GCC_VERSION=""
|
||||||
version=$($CC -dumpversion)
|
version=$($CC -dumpversion)
|
||||||
if test $? = 0; then
|
if test $? = 0; then
|
||||||
@ -326,7 +326,7 @@ AC_TYPE_SIZE_T
|
|||||||
|
|
||||||
# g++/gcc 4.x and 5.x have rather broken vector support ... 5.4.1 seems to
|
# g++/gcc 4.x and 5.x have rather broken vector support ... 5.4.1 seems to
|
||||||
# work, but 5.4.0 fails to even compile
|
# work, but 5.4.0 fails to even compile
|
||||||
AC_MSG_CHECKING([for gcc with working vector support])
|
AC_MSG_CHECKING([for $CC with working vector support])
|
||||||
if test x"$GCC_VERSION_MAJOR" != x"4" -a x"$GCC_VERSION_MAJOR" != x"5"; then
|
if test x"$GCC_VERSION_MAJOR" != x"4" -a x"$GCC_VERSION_MAJOR" != x"5"; then
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
else
|
else
|
||||||
@ -339,7 +339,7 @@ if test x"$ax_cv_have_var_attribute_vector_size" = x"yes"; then
|
|||||||
AC_MSG_CHECKING([for C++ vector shuffle])
|
AC_MSG_CHECKING([for C++ vector shuffle])
|
||||||
AC_LANG_PUSH([C++])
|
AC_LANG_PUSH([C++])
|
||||||
AC_TRY_COMPILE([
|
AC_TRY_COMPILE([
|
||||||
typedef float v4f __attribute__((vector_size(4 * sizeof(float))));
|
typedef float v4f __attribute__((vector_size(4 * sizeof(float)),aligned(16)));
|
||||||
],[
|
],[
|
||||||
v4f f; f[3] = 99;
|
v4f f; f[3] = 99;
|
||||||
],[
|
],[
|
||||||
@ -362,7 +362,7 @@ if test x"$have_vector_shuffle" = x"yes"; then
|
|||||||
AC_MSG_CHECKING([for C++ vector arithmetic])
|
AC_MSG_CHECKING([for C++ vector arithmetic])
|
||||||
AC_LANG_PUSH([C++])
|
AC_LANG_PUSH([C++])
|
||||||
AC_TRY_COMPILE([
|
AC_TRY_COMPILE([
|
||||||
typedef float v4f __attribute__((vector_size(4 * sizeof(float))));
|
typedef float v4f __attribute__((vector_size(4 * sizeof(float)),aligned(16)));
|
||||||
],[
|
],[
|
||||||
v4f f = {1, 2, 3, 4}; f *= 12.0;
|
v4f f = {1, 2, 3, 4}; f *= 12.0;
|
||||||
v4f g = {5, 6, 7, 8}; f = g > 0 ? g : -1 * g;
|
v4f g = {5, 6, 7, 8}; f = g > 0 ? g : -1 * g;
|
||||||
@ -382,7 +382,7 @@ if test x"$have_vector_arith" = x"yes"; then
|
|||||||
AC_MSG_CHECKING([for C++ signed constants in vector templates])
|
AC_MSG_CHECKING([for C++ signed constants in vector templates])
|
||||||
AC_LANG_PUSH([C++])
|
AC_LANG_PUSH([C++])
|
||||||
AC_TRY_COMPILE([
|
AC_TRY_COMPILE([
|
||||||
typedef float v4f __attribute__((vector_size(4 * sizeof(float))));
|
typedef float v4f __attribute__((vector_size(4 * sizeof(float)),aligned(16)));
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static void
|
static void
|
||||||
h( v4f B )
|
h( v4f B )
|
||||||
|
@ -85,7 +85,7 @@
|
|||||||
#ifdef HAVE_VECTOR_ARITH
|
#ifdef HAVE_VECTOR_ARITH
|
||||||
/* A vector of four floats.
|
/* A vector of four floats.
|
||||||
*/
|
*/
|
||||||
typedef float v4f __attribute__((vector_size(4 * sizeof(float))));
|
typedef float v4f __attribute__((vector_size(4 * sizeof(float)),aligned(16)));
|
||||||
#endif /*HAVE_VECTOR_ARITH*/
|
#endif /*HAVE_VECTOR_ARITH*/
|
||||||
|
|
||||||
typedef struct _VipsCompositeBase {
|
typedef struct _VipsCompositeBase {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user