Merge commit '8c7554e6a9b126bd6ee5bf80dae9e11e056db2f1'
authorJames Almer <jamrial@gmail.com>
Fri, 30 Mar 2018 00:22:43 +0000 (21:22 -0300)
committerJames Almer <jamrial@gmail.com>
Fri, 30 Mar 2018 00:25:43 +0000 (21:25 -0300)
* commit '8c7554e6a9b126bd6ee5bf80dae9e11e056db2f1':
  configure: Add check_x86asm() helper function to simplify some expressions

Merged-by: James Almer <jamrial@gmail.com>
1  2 
configure

diff --cc configure
+++ b/configure
@@@ -972,6 -808,18 +972,18 @@@ test_as()
      test_cmd $as $CPPFLAGS $ASFLAGS "$@" $AS_C $(as_o $TMPO) $TMPS
  }
  
 -    test_cmd $x86asmexe $X86ASMFLAGS "$@" $(x86asm_o $TMPO) $TMPASM
+ x86asm_o(){
+     eval printf '%s\\n' $X86ASM_O
+ }
+ test_x86asm(){
+     log test_x86asm "$@"
+     echo "$1" > $TMPASM
+     log_file $TMPASM
+     shift
++    test_cmd $x86asmexe $X86ASMFLAGS -Werror "$@" $(x86asm_o $TMPO) $TMPASM
+ }
  check_cmd(){
      log check_cmd "$@"
      cmd=$1
              elf*) enabled debug && append X86ASMFLAGS $x86asm_debug ;;
          esac
  
-         test_x86asm "vmovdqa32 [eax]{k1}{z}, zmm0"    || disable avx512_external
-         test_x86asm "vextracti128 xmm0, ymm0, 0"      || disable avx2_external
-         test_x86asm "vpmacsdd xmm0, xmm1, xmm2, xmm3" || disable xop_external
-         test_x86asm "vfmaddps ymm0, ymm1, ymm2, ymm3" || disable fma4_external
-         test_x86asm "CPU amdnop" || disable cpunop
 -        check_x86asm avx2_external "vextracti128 xmm0, ymm0, 0"
 -        check_x86asm  xop_external "vpmacsdd xmm0, xmm1, xmm2, xmm3"
 -        check_x86asm fma3_external "vfmadd132ps ymm0, ymm1, ymm2"
 -        check_x86asm fma4_external "vfmaddps ymm0, ymm1, ymm2, ymm3"
 -        check_x86asm cpunop        "CPU amdnop"
++        check_x86asm avx512_external "vmovdqa32 [eax]{k1}{z}, zmm0"
++        check_x86asm avx2_external   "vextracti128 xmm0, ymm0, 0"
++        check_x86asm xop_external    "vpmacsdd xmm0, xmm1, xmm2, xmm3"
++        check_x86asm fma4_external   "vfmaddps ymm0, ymm1, ymm2, ymm3"
++        check_x86asm cpunop          "CPU amdnop"
      fi
  
      case "$cpu" in