[Mesa-dev] [PATCH] configure: Add a condition for compiling for ARM.

Eric Anholt eric at anholt.net
Fri Jan 6 18:47:34 UTC 2017


This will let VC4 do some ARM-specific optimizations while still having
the simulator build on x86.
---

I'm finishing building the series for doing NEON optimizations today,
but I wanted to get this out there for review since it touches shared
code.

I didn't replicate the 'case "$host_os"' for this check.  Do we need
that?  I'm planning on using gcc intrinsics for arm asm code, so it
doesn't seem host os dependent.

 configure.ac | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/configure.ac b/configure.ac
index d1ffb57f57e3..1fe8e2ed071c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -763,6 +763,9 @@ if test "x$enable_asm" = xyes; then
             ;;
         esac
         ;;
+    arm)
+        asm_arch=arm
+        ;;
     sparc*)
         case "$host_os" in
         linux*)
@@ -777,6 +780,10 @@ if test "x$enable_asm" = xyes; then
         DEFINES="$DEFINES -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM"
         AC_MSG_RESULT([yes, x86])
         ;;
+    arm)
+        DEFINES="$DEFINES -DUSE_ARM_ASM"
+        AC_MSG_RESULT([yes, arm])
+        ;;
     x86_64|amd64)
         DEFINES="$DEFINES -DUSE_X86_64_ASM"
         AC_MSG_RESULT([yes, x86_64])
@@ -2683,6 +2690,7 @@ AM_CONDITIONAL(HAVE_COMMON_OSMESA, test "x$enable_osmesa" = xyes -o \
 AM_CONDITIONAL(HAVE_X86_ASM, test "x$asm_arch" = xx86 -o "x$asm_arch" = xx86_64)
 AM_CONDITIONAL(HAVE_X86_64_ASM, test "x$asm_arch" = xx86_64)
 AM_CONDITIONAL(HAVE_SPARC_ASM, test "x$asm_arch" = xsparc)
+AM_CONDITIONAL(HAVE_ARM_ASM, test "x$asm_arch" = xarm)
 
 AC_SUBST([NINE_MAJOR], 1)
 AC_SUBST([NINE_MINOR], 0)
-- 
2.11.0



More information about the mesa-dev mailing list