[x264-devel] [PATCH 3/3] configure: Add support for building with MSVC/armasm for ARM64

Martin Storsjö martin at martin.st
Mon Oct 16 21:50:27 CEST 2017


---
This requires gas-preprocessor with a number of patches that still
are in review; once that has settled, I can send a patch that updates
the bundled gas-preprocessor to that version.
---
 configure | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 17d1ffa..bb24632 100755
--- a/configure
+++ b/configure
@@ -807,9 +807,13 @@ case $host_cpu in
     aarch64)
         ARCH="AARCH64"
         stack_alignment=16
-        AS="${AS-${CC}}"
         if [ "$SYS" = MACOSX ] ; then
+            AS="${AS-${CC}}"
             ASFLAGS="$ASFLAGS -DPREFIX -DPIC"
+        elif [ "$SYS" = WINDOWS ] ; then
+            AS="${AS-${SRCPATH}/tools/gas-preprocessor.pl -arch aarch64 -as-type armasm -- armasm64 -nologo}"
+        else
+            AS="${AS-${CC}}"
         fi
         ;;
     s390|s390x)
@@ -944,7 +948,10 @@ if [ $asm = auto -a $ARCH = ARM ] ; then
 fi
 
 if [ $asm = auto -a $ARCH = AARCH64 ] ; then
-    if  cc_check '' '' '__asm__("cmeq v0.8h, v0.8h, #0");' ; then define HAVE_NEON
+    if [ $compiler = CL ] && cpp_check '' '' 'defined(_M_ARM64)' ; then
+        define HAVE_NEON
+    elif cc_check '' '' '__asm__("cmeq v0.8h, v0.8h, #0");' ; then
+        define HAVE_NEON
         ASFLAGS="$ASFLAGS -c"
     else
         echo "no NEON support, try adding -mfpu=neon to CFLAGS"
-- 
2.7.4



More information about the x264-devel mailing list