mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
Bug 593629: Only check for ARM SIMD and NEON when the CPU_ARCH is ARM. r=ted
This commit is contained in:
parent
db70e38a67
commit
b7751008fa
41
configure.in
41
configure.in
@ -3589,36 +3589,39 @@ AC_SUBST(XEXT_LIBS)
|
||||
AC_SUBST(XT_LIBS)
|
||||
AC_SUBST(XSS_LIBS)
|
||||
|
||||
AC_MSG_CHECKING(for ARM SIMD support in compiler)
|
||||
# We try to link so that this also fails when
|
||||
# building with LTO.
|
||||
AC_TRY_LINK([],
|
||||
if test "$CPU_ARCH" = "arm"; then
|
||||
AC_MSG_CHECKING(for ARM SIMD support in compiler)
|
||||
# We try to link so that this also fails when
|
||||
# building with LTO.
|
||||
AC_TRY_LINK([],
|
||||
[asm("uqadd8 r1, r1, r2");],
|
||||
result="yes", result="no")
|
||||
AC_MSG_RESULT("$result")
|
||||
if test "$result" = "yes"; then
|
||||
AC_MSG_RESULT("$result")
|
||||
if test "$result" = "yes"; then
|
||||
AC_DEFINE(HAVE_ARM_SIMD)
|
||||
HAVE_ARM_SIMD=1
|
||||
fi
|
||||
AC_SUBST(HAVE_ARM_SIMD)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for ARM NEON support in compiler)
|
||||
_SAVE_CFLAGS="$CFLAGS"
|
||||
if test "$GNU_CC"; then
|
||||
AC_MSG_CHECKING(for ARM NEON support in compiler)
|
||||
_SAVE_CFLAGS="$CFLAGS"
|
||||
if test "$GNU_CC"; then
|
||||
# gcc needs -mfpu=neon to recognize NEON instructions
|
||||
CFLAGS="$CFLAGS -mfpu=neon -mfloat-abi=softfp"
|
||||
fi
|
||||
# We try to link so that this also fails when
|
||||
# building with LTO.
|
||||
AC_TRY_LINK([],
|
||||
fi
|
||||
# We try to link so that this also fails when
|
||||
# building with LTO.
|
||||
AC_TRY_LINK([],
|
||||
[asm("vadd.i8 d0, d0, d0");],
|
||||
result="yes", result="no")
|
||||
AC_MSG_RESULT("$result")
|
||||
if test "$result" = "yes"; then
|
||||
AC_MSG_RESULT("$result")
|
||||
if test "$result" = "yes"; then
|
||||
AC_DEFINE(HAVE_ARM_NEON)
|
||||
HAVE_ARM_NEON=1
|
||||
fi
|
||||
CFLAGS="$_SAVE_CFLAGS"
|
||||
fi
|
||||
CFLAGS="$_SAVE_CFLAGS"
|
||||
fi # CPU_ARCH = arm
|
||||
|
||||
AC_SUBST(HAVE_ARM_SIMD)
|
||||
AC_SUBST(HAVE_ARM_NEON)
|
||||
|
||||
dnl ========================================================
|
||||
|
@ -1,5 +1,5 @@
|
||||
dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; -*-
|
||||
dnl vi: set tabstop=4 shiftwidth=4 expandtab:
|
||||
dnl vi: set tabstop=4 shiftwidth=4 expandtab syntax=m4:
|
||||
dnl ***** BEGIN LICENSE BLOCK *****
|
||||
dnl Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
dnl
|
||||
@ -3455,32 +3455,35 @@ case $target in
|
||||
AC_CHECK_LIB(socket, socket)
|
||||
esac
|
||||
|
||||
AC_MSG_CHECKING(for ARM SIMD support in compiler)
|
||||
AC_TRY_COMPILE([],
|
||||
if test "$CPU_ARCH" = "arm"; then
|
||||
AC_MSG_CHECKING(for ARM SIMD support in compiler)
|
||||
AC_TRY_COMPILE([],
|
||||
[asm("uqadd8 r1, r1, r2");],
|
||||
result="yes", result="no")
|
||||
AC_MSG_RESULT("$result")
|
||||
if test "$result" = "yes"; then
|
||||
AC_MSG_RESULT("$result")
|
||||
if test "$result" = "yes"; then
|
||||
AC_DEFINE(HAVE_ARM_SIMD)
|
||||
HAVE_ARM_SIMD=1
|
||||
fi
|
||||
AC_SUBST(HAVE_ARM_SIMD)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for ARM NEON support in compiler)
|
||||
_SAVE_CFLAGS="$CFLAGS"
|
||||
if test "$GNU_CC"; then
|
||||
AC_MSG_CHECKING(for ARM NEON support in compiler)
|
||||
_SAVE_CFLAGS="$CFLAGS"
|
||||
if test "$GNU_CC"; then
|
||||
# gcc needs -mfpu=neon to recognize NEON instructions
|
||||
CFLAGS="$CFLAGS -mfpu=neon -mfloat-abi=softfp"
|
||||
fi
|
||||
AC_TRY_COMPILE([],
|
||||
fi
|
||||
AC_TRY_COMPILE([],
|
||||
[asm("vadd.i8 d0, d0, d0");],
|
||||
result="yes", result="no")
|
||||
AC_MSG_RESULT("$result")
|
||||
if test "$result" = "yes"; then
|
||||
AC_MSG_RESULT("$result")
|
||||
if test "$result" = "yes"; then
|
||||
AC_DEFINE(HAVE_ARM_NEON)
|
||||
HAVE_ARM_NEON=1
|
||||
fi
|
||||
CFLAGS="$_SAVE_CFLAGS"
|
||||
fi
|
||||
CFLAGS="$_SAVE_CFLAGS"
|
||||
|
||||
AC_SUBST(HAVE_ARM_SIMD)
|
||||
AC_SUBST(HAVE_ARM_NEON)
|
||||
|
||||
dnl ========================================================
|
||||
|
Loading…
Reference in New Issue
Block a user