Skip to content

Commit 9b35322

Browse files
committed
Remove YASM support
Signed-off-by: Pablo de Lara <[email protected]>
1 parent 8401831 commit 9b35322

File tree

8 files changed

+23
-126
lines changed

8 files changed

+23
-126
lines changed

Makefile.am

+4-7
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,7 @@ test: $(addsuffix .run,$(unit_tests))
129129
$<
130130
@echo Completed run: $<
131131

132-
# Support for yasm/nasm/gas
133-
if USE_YASM
134-
as_filter = ${srcdir}/tools/yasm-filter.sh
135-
endif
132+
# Support for nasm/gas
136133
if USE_NASM
137134
as_filter = ${srcdir}/tools/nasm-filter.sh
138135
endif
@@ -144,14 +141,14 @@ if CPU_RISCV64
144141
endif
145142

146143
CCAS = $(as_filter)
147-
EXTRA_DIST += tools/yasm-filter.sh tools/nasm-filter.sh
148-
EXTRA_DIST += tools/yasm-cet-filter.sh tools/nasm-cet-filter.sh
144+
EXTRA_DIST += tools/nasm-filter.sh
145+
EXTRA_DIST += tools/nasm-cet-filter.sh
149146

150147
AM_CFLAGS = ${my_CFLAGS} ${INCLUDE} $(src_include) ${ARCH} ${D}
151148
if CPU_AARCH64
152149
AM_CCASFLAGS = ${AM_CFLAGS}
153150
else
154-
AM_CCASFLAGS = ${yasm_args} ${INCLUDE} ${src_include} ${DEFS} ${D}
151+
AM_CCASFLAGS = ${asm_args} ${INCLUDE} ${src_include} ${DEFS} ${D}
155152
endif
156153
if CPU_RISCV64
157154
AM_CCASFLAGS = ${AM_CFLAGS}

Makefile.nmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ objs = \
193193
bin\mem_multibinary.obj
194194

195195
INCLUDES = -I./ -Ierasure_code/ -Iraid/ -Icrc/ -Iigzip/ -Iprograms/ -Imem/ -Iinclude/ -Itests/fuzz/ -Iexamples/ec/
196-
# Modern asm feature level, consider upgrading nasm/yasm before decreasing feature_level
196+
# Modern asm feature level, consider upgrading nasm before decreasing feature_level
197197
FEAT_FLAGS = -DHAVE_AS_KNOWS_AVX512 -DAS_FEATURE_LEVEL=10
198198
CFLAGS_REL = -O2 -DNDEBUG /Z7 /Gy
199199
CFLAGS_DBG = -Od -DDEBUG /Z7

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ Building ISA-L
3939
* Optional: Manual generation requires help2man package.
4040

4141
x86_64:
42-
* Assembler: nasm. Version 2.15 or later suggested (other versions of nasm and
43-
yasm may build but with limited function [support](doc/build.md)).
42+
* Assembler: nasm. Version 2.15 or later suggested (other versions of nasm
43+
may build but with limited function [support](doc/build.md)).
4444
* Compiler: gcc, clang, icc or VC compiler.
4545

4646
aarch64:

configure.ac

+12-68
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ AS_IF([test "x$enable_debug" = "xyes"], [
9292
AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
9393
])
9494

95-
# If this build is for x86, look for yasm and nasm
95+
# If this build is for x86, look for nasm
9696
if test x"$is_x86" = x"yes"; then
9797
AC_MSG_CHECKING([whether Intel CET is enabled])
9898
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
@@ -122,48 +122,8 @@ int main(int argc, char **argv)
122122
LDFLAGS=""]
123123
)
124124

125-
# Pick an assembler yasm or nasm
125+
# Pick NASM assembler
126126
if test x"$AS" = x""; then
127-
# Check for yasm and yasm features
128-
yasm_feature_level=0
129-
AC_CHECK_PROG(HAVE_YASM, yasm, yes, no)
130-
if test "$HAVE_YASM" = "yes"; then
131-
yasm_feature_level=1
132-
else
133-
AC_MSG_RESULT([no yasm])
134-
fi
135-
if test x"$yasm_feature_level" = x"1"; then
136-
AC_MSG_CHECKING([for modern yasm])
137-
AC_LANG_CONFTEST([AC_LANG_SOURCE([[vmovdqa %xmm0, %xmm1;]])])
138-
if yasm -f elf64 -p gas conftest.c ; then
139-
AC_MSG_RESULT([yes])
140-
yasm_feature_level=4
141-
else
142-
AC_MSG_RESULT([no])
143-
fi
144-
fi
145-
if test x"$yasm_feature_level" = x"4"; then
146-
AC_MSG_CHECKING([for optional yasm AVX512 support])
147-
AC_LANG_CONFTEST([AC_LANG_SOURCE([[vpshufb %zmm0, %zmm1, %zmm2;]])])
148-
if yasm -f elf64 -p gas conftest.c 2> /dev/null; then
149-
AC_MSG_RESULT([yes])
150-
yasm_feature_level=6
151-
else
152-
AC_MSG_RESULT([no])
153-
fi
154-
fi
155-
if test x"$yasm_feature_level" = x"6"; then
156-
AC_MSG_CHECKING([for additional yasm AVX512 support])
157-
AC_LANG_CONFTEST([AC_LANG_SOURCE([[vpcompressb zmm0, k1, zmm1;]])])
158-
sed -i -e '/vpcompressb/!d' conftest.c
159-
if yasm -f elf64 conftest.c 2> /dev/null; then
160-
AC_MSG_RESULT([yes])
161-
yasm_feature_level=10
162-
else
163-
AC_MSG_RESULT([no])
164-
fi
165-
fi
166-
167127
# Check for nasm and nasm features
168128
nasm_feature_level=0
169129
AC_CHECK_PROG(HAVE_NASM, nasm, yes, no)
@@ -207,13 +167,8 @@ int main(int argc, char **argv)
207167
fi
208168
fi
209169

210-
if test $nasm_feature_level -ge $yasm_feature_level ; then
211-
AS=nasm
212-
as_feature_level=$nasm_feature_level
213-
else
214-
AS=yasm
215-
as_feature_level=$yasm_feature_level
216-
fi
170+
AS=nasm
171+
as_feature_level=$nasm_feature_level
217172

218173
else
219174
# Check for $AS supported features
@@ -261,26 +216,17 @@ int main(int argc, char **argv)
261216
fi
262217

263218
if test $as_feature_level -lt 2 ; then
264-
AC_MSG_ERROR([No modern nasm or yasm found as required. Nasm should be v2.11.01 or later (v2.13 for AVX512) and yasm should be 1.2.0 or later.])
219+
AC_MSG_ERROR([No modern nasm found as required. Nasm should be v2.11.01 or later (v2.13 for AVX512).])
265220
fi
266221

267222
case $host_os in
268-
*linux*) arch=linux yasm_args="-f elf64";;
269-
*darwin*) arch=darwin yasm_args="-f macho64 --prefix=_ ";;
270-
*netbsd*) arch=netbsd yasm_args="-f elf64";;
271-
*mingw*) arch=mingw yasm_args="-f win64";;
272-
*) arch=unknown yasm_args="-f elf64";;
223+
*linux*) arch=linux asm_args="-f elf64";;
224+
*darwin*) arch=darwin asm_args="-f macho64 --prefix=_ ";;
225+
*netbsd*) arch=netbsd asm_args="-f elf64";;
226+
*mingw*) arch=mingw asm_args="-f win64";;
227+
*) arch=unknown asm_args="-f elf64";;
273228
esac
274229

275-
# Fix for nasm missing windows features
276-
if test x"$arch" = x"mingw"; then
277-
AS=yasm
278-
as_feature_level=$yasm_feature_level
279-
if test $as_feature_level -lt 2 ; then
280-
AC_MSG_ERROR([Mingw build requires Yasm 1.2.0 or later.])
281-
fi
282-
fi
283-
284230
AC_DEFINE_UNQUOTED(AS_FEATURE_LEVEL, [$as_feature_level], [Assembler feature level.])
285231
if test $as_feature_level -ge 6 ; then
286232
AC_DEFINE(HAVE_AS_KNOWS_AVX512, [1], [Assembler can do AVX512.])
@@ -289,15 +235,13 @@ int main(int argc, char **argv)
289235
AC_MSG_RESULT([Assembler does not understand AVX512 opcodes. Consider upgrading for best performance.])
290236
fi
291237

292-
AM_CONDITIONAL(USE_YASM, test x"$AS" = x"yasm")
293238
AM_CONDITIONAL(USE_NASM, test x"$AS" = x"nasm")
294239
AM_CONDITIONAL(WITH_AVX512, test x"$have_as_knows_avx512" = x"yes")
295-
AC_SUBST([yasm_args])
240+
AC_SUBST([asm_args])
296241
AM_CONDITIONAL(DARWIN, test x"$arch" = x"darwin")
297-
AC_MSG_RESULT([Using $AS args target "$arch" "$yasm_args"])
242+
AC_MSG_RESULT([Using $AS args target "$arch" "$asm_args"])
298243
else
299244
# Disable below conditionals if not x86
300-
AM_CONDITIONAL(USE_YASM, test "x" = "y")
301245
AM_CONDITIONAL(USE_NASM, test "x" = "y")
302246
AM_CONDITIONAL(WITH_AVX512, test "x" = "y")
303247
AM_CONDITIONAL(DARWIN, test "x" = "y")

doc/build.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
NASM: For x86-64 builds it is highly recommended to get an up-to-date version of
66
[nasm] that can understand the latest instruction sets. Building with an older
77
assembler version is often possible but the library may lack some function
8-
versions for the best performance. For example, as a minimum, nasm v2.11.01 or
9-
yasm 1.2.0 can be used to build a limited functionality library but it will not
8+
versions for the best performance. For example, as a minimum, nasm v2.11.01
9+
can be used to build a limited functionality library but it will not
1010
include any function versions with AVX2, AVX512, or optimizations for many
1111
processors before the assembler's build. The configure or make tools can run
1212
tests to check the assembler's knowledge of new instructions and change build

make.inc

+1-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ AS = nasm
5353
AWK = awk
5454

5555
DEBUG = -g
56-
DEBUG_yasm = -g dwarf2
5756
DEBUG_nasm = -g
5857

5958
# Default arch= build options
@@ -239,7 +238,7 @@ $(addsuffix .run,$(all_tests)): %.run : %
239238
# Other build rules
240239
msg = $(if $(DEBUG),DEBUG) $(patsubst 32,32-bit,$(host_cpu)) $D
241240

242-
# yasm/nasm assembly files
241+
# nasm assembly files
243242
$(O)/%.o: %.asm
244243
@echo " ---> Building $< $(msg)"
245244
@$(AS) $(ASFLAGS) -o $@ $<

tools/gen_nmake.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Makefile.nmake tst.nmake: FORCE
1919
@echo '' >> $@
2020
@echo '' >> $@
2121
@echo 'INCLUDES = $(INCLUDE)' >> $@
22-
@echo '# Modern asm feature level, consider upgrading nasm/yasm before decreasing feature_level' >> $@
22+
@echo '# Modern asm feature level, consider upgrading nasm before decreasing feature_level' >> $@
2323
@echo 'FEAT_FLAGS = -DHAVE_AS_KNOWS_AVX512 -DAS_FEATURE_LEVEL=10' >> $@
2424
@echo 'CFLAGS_REL = -O2 -DNDEBUG /Z7 /Gy' >> $@
2525
@echo 'CFLAGS_DBG = -Od -DDEBUG /Z7' >> $@

tools/yasm-filter.sh

-43
This file was deleted.

0 commit comments

Comments
 (0)