@@ -135,31 +135,9 @@ int main(int argc, char **argv)
135
135
136
136
if test x"$nasm_feature_level" = x"1"; then
137
137
AC_MSG_CHECKING ( [ for modern nasm] )
138
- AC_LANG_CONFTEST ( [ AC_LANG_SOURCE ( [ [ pblendvb xmm2, xmm1;] ] ) ] )
139
- sed -i -e '/pblendvb/!d' conftest.c
140
- if nasm -f elf64 conftest.c 2> /dev/null; then
141
- AC_MSG_RESULT ( [ yes] )
142
- nasm_feature_level=4
143
- else
144
- AC_MSG_RESULT ( [ no] )
145
- fi
146
- fi
147
- if test x"$nasm_feature_level" = x"4"; then
148
- AC_MSG_CHECKING ( [ for optional nasm AVX512 support] )
149
- AC_LANG_CONFTEST ( [ AC_LANG_SOURCE ( [ [ vinserti32x8 zmm0, ymm1, 1;] ] ) ] )
150
- sed -i -e '/vinsert/!d' conftest.c
151
- if nasm -f elf64 conftest.c 2> /dev/null; then
152
- AC_MSG_RESULT ( [ yes] )
153
- nasm_feature_level=6
154
- else
155
- AC_MSG_RESULT ( [ no] )
156
- fi
157
- fi
158
- if test x"$nasm_feature_level" = x"6"; then
159
- AC_MSG_CHECKING ( [ for additional nasm AVX512 support] )
160
138
AC_LANG_CONFTEST ( [ AC_LANG_SOURCE ( [ [ vpcompressb zmm0 {k1}, zmm1;] ] ) ] )
161
139
sed -i -e '/vpcompressb/!d' conftest.c
162
- if nasm -f elf64 conftest.c 2> /dev/null; then
140
+ if nasm -f elf64 conftest.c 2> /dev/null; then
163
141
AC_MSG_RESULT ( [ yes] )
164
142
nasm_feature_level=10
165
143
else
@@ -181,29 +159,6 @@ int main(int argc, char **argv)
181
159
fi
182
160
183
161
if test x"$as_feature_level" = x"1"; then
184
- AC_MSG_CHECKING ( [ for modern $AS] )
185
- AC_LANG_CONFTEST ( [ AC_LANG_SOURCE ( [ [ pblendvb xmm2, xmm1;] ] ) ] )
186
- sed -i -e '/pblendvb/!d' conftest.c
187
- if $AS -f elf64 conftest.c 2> /dev/null; then
188
- AC_MSG_RESULT ( [ yes] )
189
- as_feature_level=4
190
- else
191
- AC_MSG_RESULT ( [ no] )
192
- fi
193
- fi
194
- if test x"$as_feature_level" = x"4"; then
195
- AC_MSG_CHECKING ( [ for optional as AVX512 support] )
196
- AC_LANG_CONFTEST ( [ AC_LANG_SOURCE ( [ [ vinserti32x8 zmm0, ymm1, 1;] ] ) ] )
197
- sed -i -e '/vinsert/!d' conftest.c
198
- if $AS -f elf64 conftest.c 2> /dev/null; then
199
- AC_MSG_RESULT ( [ yes] )
200
- as_feature_level=6
201
- else
202
- AC_MSG_RESULT ( [ no] )
203
- fi
204
- fi
205
- if test x"$as_feature_level" = x"6"; then
206
- AC_MSG_CHECKING ( [ for additional as AVX512 support] )
207
162
AC_LANG_CONFTEST ( [ AC_LANG_SOURCE ( [ [ vpcompressb zmm0, k1, zmm1;] ] ) ] )
208
163
sed -i -e '/vpcompressb/!d' conftest.c
209
164
if $AS -f elf64 conftest.c 2> /dev/null; then
@@ -215,8 +170,8 @@ int main(int argc, char **argv)
215
170
fi
216
171
fi
217
172
218
- if test $as_feature_level -lt 2 ; then
219
- AC_MSG_ERROR ( [ No modern nasm found as required. Nasm should be v2.11 .01 or later (v2.13 for AVX512) .] )
173
+ if test $as_feature_level -lt 10 ; then
174
+ AC_MSG_ERROR ( [ No modern nasm found as required. Nasm should be v2.14 .01 or later.] )
220
175
fi
221
176
222
177
case $host_os in
@@ -227,23 +182,13 @@ int main(int argc, char **argv)
227
182
*) arch=unknown asm_args="-f elf64";;
228
183
esac
229
184
230
- AC_DEFINE_UNQUOTED ( AS_FEATURE_LEVEL , [ $as_feature_level] , [ Assembler feature level.] )
231
- if test $as_feature_level -ge 6 ; then
232
- AC_DEFINE ( HAVE_AS_KNOWS_AVX512 , [ 1] , [ Assembler can do AVX512.] )
233
- have_as_knows_avx512=yes
234
- else
235
- AC_MSG_RESULT ( [ Assembler does not understand AVX512 opcodes. Consider upgrading for best performance.] )
236
- fi
237
-
238
185
AM_CONDITIONAL(USE_NASM, test x"$AS" = x"nasm")
239
- AM_CONDITIONAL(WITH_AVX512, test x"$have_as_knows_avx512" = x"yes")
240
186
AC_SUBST ( [ asm_args] )
241
187
AM_CONDITIONAL(DARWIN, test x"$arch" = x"darwin")
242
188
AC_MSG_RESULT ( [ Using $AS args target "$arch" "$asm_args"] )
243
189
else
244
190
# Disable below conditionals if not x86
245
191
AM_CONDITIONAL(USE_NASM, test "x" = "y")
246
- AM_CONDITIONAL(WITH_AVX512, test "x" = "y")
247
192
AM_CONDITIONAL(DARWIN, test "x" = "y")
248
193
fi
249
194
0 commit comments