Convert files to build with nasm or yasm
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
This commit is contained in:
parent
00c1efc109
commit
bc4dfc9bbc
21
Makefile.am
21
Makefile.am
@ -5,7 +5,7 @@ AM_MAKEFLAGS = --no-print-directory
|
||||
noinst_HEADERS =
|
||||
pkginclude_HEADERS = include/test.h
|
||||
noinst_LTLIBRARIES =
|
||||
INCLUDE = -I $(srcdir)/include
|
||||
INCLUDE = -I $(srcdir)/include/
|
||||
AM_CFLAGS = ${my_CFLAGS} ${INCLUDE} ${D}
|
||||
|
||||
lsrc=
|
||||
@ -23,6 +23,7 @@ unit_tests32=
|
||||
perf_tests32=
|
||||
|
||||
# Include units
|
||||
|
||||
include erasure_code/Makefile.am
|
||||
|
||||
# LIB version info not necessarily the same as package version
|
||||
@ -65,10 +66,18 @@ test: $(addsuffix .run,$(unit_tests))
|
||||
$<
|
||||
@echo Completed run: $<
|
||||
|
||||
# Support for yasm
|
||||
CCAS = ${srcdir}/tools/yasm-filter.sh
|
||||
EXTRA_DIST += tools/yasm-filter.sh
|
||||
AM_CCASFLAGS = ${yasm_args} ${INCLUDE}
|
||||
# Support for yasm/nasm
|
||||
if USE_YASM
|
||||
as_filter = ${srcdir}/tools/yasm-filter.sh
|
||||
endif
|
||||
if USE_NASM
|
||||
as_filter = ${srcdir}/tools/nasm-filter.sh
|
||||
as_include = $(addprefix -I ${srcdir}/,$(sort $(dir $(lsrc))))
|
||||
endif
|
||||
|
||||
CCAS = $(as_filter)
|
||||
EXTRA_DIST += tools/yasm-filter.sh tools/nasm-filter.sh
|
||||
AM_CCASFLAGS = ${yasm_args} ${INCLUDE} ${as_include} ${DEFS} ${D}
|
||||
|
||||
.asm.s:
|
||||
@echo " MKTMP " $@;
|
||||
@ -89,7 +98,7 @@ isa-l.h:
|
||||
@echo '#define ISAL_MAKE_VERSION(maj, min, patch) ((maj) * 0x10000 + (min) * 0x100 + (patch))' >> $@
|
||||
@echo '#define ISAL_VERSION ISAL_MAKE_VERSION(ISAL_MAJOR_VERSION, ISAL_MINOR_VERSION, ISAL_PATCH_VERSION)' >> $@
|
||||
@echo '' >> $@
|
||||
@for unit in ${extern_hdrs}; do echo "#include <isa-l/$$unit>" | sed -e 's;include/;;' >> $@; done
|
||||
@for unit in $(sort $(extern_hdrs)); do echo "#include <isa-l/$$unit>" | sed -e 's;include/;;' >> $@; done
|
||||
@echo '#endif //_ISAL_H_' >> $@
|
||||
|
||||
|
||||
|
2
README
2
README
@ -5,7 +5,7 @@ Intel(R) Intelligent Storage Acceleration Library
|
||||
Build Prerequisites
|
||||
===================
|
||||
|
||||
ISA-L requires yasm version 1.2 or later.
|
||||
ISA-L requires yasm version 1.2.0 or later or nasm v2.11.01 or later.
|
||||
|
||||
Building ISA-L
|
||||
==============
|
||||
|
@ -255,13 +255,13 @@ func(gf_2vect_dot_prod_avx)
|
||||
mov dest1, [dest1]
|
||||
SSTR dest1_m, dest1
|
||||
|
||||
.loop16
|
||||
.loop16:
|
||||
vpxor xp1, xp1
|
||||
vpxor xp2, xp2
|
||||
mov tmp, mul_array
|
||||
xor vec_i, vec_i
|
||||
|
||||
.next_vect
|
||||
.next_vect:
|
||||
SLDR src, src_m
|
||||
mov ptr, [src+vec_i]
|
||||
|
||||
@ -331,7 +331,7 @@ endproc_frame
|
||||
section .data
|
||||
|
||||
align 16
|
||||
mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
mask0f: dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_2vect_dot_prod_avx, 02, 05, 0191
|
||||
|
@ -268,13 +268,13 @@ func(gf_2vect_dot_prod_avx2)
|
||||
mov dest1, [dest1]
|
||||
SSTR dest1_m, dest1
|
||||
|
||||
.loop32
|
||||
.loop32:
|
||||
vpxor xp1, xp1
|
||||
vpxor xp2, xp2
|
||||
mov tmp, mul_array
|
||||
xor vec_i, vec_i
|
||||
|
||||
.next_vect
|
||||
.next_vect:
|
||||
SLDR src, src_m
|
||||
mov ptr, [src+vec_i]
|
||||
|
||||
|
@ -255,13 +255,13 @@ func(gf_2vect_dot_prod_sse)
|
||||
mov dest1, [dest1]
|
||||
SSTR dest1_m, dest1
|
||||
|
||||
.loop16
|
||||
.loop16:
|
||||
pxor xp1, xp1
|
||||
pxor xp2, xp2
|
||||
mov tmp, mul_array
|
||||
xor vec_i, vec_i
|
||||
|
||||
.next_vect
|
||||
.next_vect:
|
||||
SLDR src, src_m
|
||||
mov ptr, [src+vec_i]
|
||||
|
||||
@ -333,7 +333,7 @@ endproc_frame
|
||||
section .data
|
||||
|
||||
align 16
|
||||
mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
mask0f: dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_2vect_dot_prod_sse, 00, 04, 0062
|
||||
|
@ -178,7 +178,7 @@ func(gf_2vect_mad_avx)
|
||||
XLDR xtmpd1, [dest1+len] ;backup the last 16 bytes in dest
|
||||
XLDR xtmpd2, [dest2+len] ;backup the last 16 bytes in dest
|
||||
|
||||
.loop16
|
||||
.loop16:
|
||||
XLDR xd1, [dest1+pos] ;Get next dest vector
|
||||
XLDR xd2, [dest2+pos] ;Get next dest vector
|
||||
.loop16_overlap:
|
||||
@ -230,7 +230,7 @@ endproc_frame
|
||||
section .data
|
||||
|
||||
align 16
|
||||
mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
mask0f: dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_2vect_mad_avx, 02, 01, 0204
|
||||
|
@ -192,7 +192,7 @@ func(gf_2vect_mad_avx2)
|
||||
XLDR xtmpd1, [dest1+len] ;backup the last 16 bytes in dest
|
||||
XLDR xtmpd2, [dest2+len] ;backup the last 16 bytes in dest
|
||||
|
||||
.loop32
|
||||
.loop32:
|
||||
XLDR xd1, [dest1+pos] ;Get next dest vector
|
||||
XLDR xd2, [dest2+pos] ;Get next dest vector
|
||||
.loop32_overlap:
|
||||
|
@ -233,7 +233,7 @@ section .data
|
||||
align 16
|
||||
|
||||
mask0f:
|
||||
ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_2vect_mad_sse, 00, 01, 0203
|
||||
|
@ -371,7 +371,7 @@ endproc_frame
|
||||
section .data
|
||||
|
||||
align 16
|
||||
mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
mask0f: dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_3vect_dot_prod_avx, 02, 05, 0192
|
||||
|
@ -372,7 +372,7 @@ endproc_frame
|
||||
section .data
|
||||
|
||||
align 16
|
||||
mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
mask0f: dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_3vect_dot_prod_sse, 00, 06, 0063
|
||||
|
@ -280,9 +280,9 @@ endproc_frame
|
||||
section .data
|
||||
|
||||
align 16
|
||||
mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
mask0f: dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
constip16:
|
||||
ddq 0xf0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
|
||||
dq 0xf8f9fafbfcfdfeff, 0xf0f1f2f3f4f5f6f7
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_3vect_mad_avx, 02, 01, 0207
|
||||
|
@ -310,8 +310,8 @@ section .data
|
||||
|
||||
align 32
|
||||
constip32:
|
||||
ddq 0xf0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
|
||||
ddq 0xe0e1e2e3e4e5e6e7e8e9eaebecedeeef
|
||||
dq 0xf8f9fafbfcfdfeff, 0xf0f1f2f3f4f5f6f7
|
||||
dq 0xe8e9eaebecedeeef, 0xe0e1e2e3e4e5e6e7
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_3vect_mad_avx2, 04, 01, 0208
|
||||
|
@ -290,9 +290,9 @@ section .data
|
||||
align 16
|
||||
|
||||
mask0f:
|
||||
ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
constip16:
|
||||
ddq 0xf0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
|
||||
dq 0xf8f9fafbfcfdfeff, 0xf0f1f2f3f4f5f6f7
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_3vect_mad_sse, 00, 01, 0206
|
||||
|
@ -435,7 +435,7 @@ endproc_frame
|
||||
section .data
|
||||
|
||||
align 16
|
||||
mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
mask0f: dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_4vect_dot_prod_avx, 02, 05, 0193
|
||||
|
@ -437,7 +437,7 @@ endproc_frame
|
||||
section .data
|
||||
|
||||
align 16
|
||||
mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
mask0f: dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_4vect_dot_prod_sse, 00, 06, 0064
|
||||
|
@ -328,9 +328,9 @@ endproc_frame
|
||||
section .data
|
||||
|
||||
align 16
|
||||
mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
mask0f: dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
constip16:
|
||||
ddq 0xf0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
|
||||
dq 0xf8f9fafbfcfdfeff, 0xf0f1f2f3f4f5f6f7
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_4vect_mad_avx, 02, 01, 020a
|
||||
|
@ -335,8 +335,8 @@ endproc_frame
|
||||
section .data
|
||||
align 32
|
||||
constip32:
|
||||
ddq 0xf0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
|
||||
ddq 0xe0e1e2e3e4e5e6e7e8e9eaebecedeeef
|
||||
dq 0xf8f9fafbfcfdfeff, 0xf0f1f2f3f4f5f6f7
|
||||
dq 0xe8e9eaebecedeeef, 0xe0e1e2e3e4e5e6e7
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_4vect_mad_avx2, 04, 01, 020b
|
||||
|
@ -334,9 +334,9 @@ section .data
|
||||
align 16
|
||||
|
||||
mask0f:
|
||||
ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
constip16:
|
||||
ddq 0xf0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
|
||||
dq 0xf8f9fafbfcfdfeff, 0xf0f1f2f3f4f5f6f7
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_4vect_mad_sse, 00, 01, 0209
|
||||
|
@ -297,7 +297,7 @@ endproc_frame
|
||||
section .data
|
||||
|
||||
align 16
|
||||
mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
mask0f: dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_5vect_dot_prod_avx, 02, 04, 0194
|
||||
|
@ -298,7 +298,7 @@ endproc_frame
|
||||
section .data
|
||||
|
||||
align 16
|
||||
mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
mask0f: dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_5vect_dot_prod_sse, 00, 05, 0065
|
||||
|
@ -357,9 +357,9 @@ endproc_frame
|
||||
section .data
|
||||
|
||||
align 16
|
||||
mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
mask0f: dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
constip16:
|
||||
ddq 0xf0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
|
||||
dq 0xf8f9fafbfcfdfeff, 0xf0f1f2f3f4f5f6f7
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_5vect_mad_avx, 02, 01, 020d
|
||||
|
@ -356,8 +356,8 @@ endproc_frame
|
||||
section .data
|
||||
align 32
|
||||
constip32:
|
||||
ddq 0xf0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
|
||||
ddq 0xe0e1e2e3e4e5e6e7e8e9eaebecedeeef
|
||||
dq 0xf8f9fafbfcfdfeff, 0xf0f1f2f3f4f5f6f7
|
||||
dq 0xe8e9eaebecedeeef, 0xe0e1e2e3e4e5e6e7
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_5vect_mad_avx2, 04, 01, 020e
|
||||
|
@ -365,9 +365,9 @@ section .data
|
||||
align 16
|
||||
|
||||
mask0f:
|
||||
ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
constip16:
|
||||
ddq 0xf0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
|
||||
dq 0xf8f9fafbfcfdfeff, 0xf0f1f2f3f4f5f6f7
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_5vect_mad_sse, 00, 01, 020c
|
||||
|
@ -309,7 +309,7 @@ endproc_frame
|
||||
section .data
|
||||
|
||||
align 16
|
||||
mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
mask0f: dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_6vect_dot_prod_avx, 02, 04, 0195
|
||||
|
@ -309,7 +309,7 @@ endproc_frame
|
||||
section .data
|
||||
|
||||
align 16
|
||||
mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
mask0f: dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_6vect_dot_prod_sse, 00, 05, 0066
|
||||
|
@ -386,9 +386,9 @@ endproc_frame
|
||||
section .data
|
||||
|
||||
align 16
|
||||
mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
mask0f: dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
constip16:
|
||||
ddq 0xf0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
|
||||
dq 0xf8f9fafbfcfdfeff, 0xf0f1f2f3f4f5f6f7
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_6vect_mad_avx, 02, 01, 0210
|
||||
|
@ -393,8 +393,8 @@ endproc_frame
|
||||
section .data
|
||||
align 32
|
||||
constip32:
|
||||
ddq 0xf0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
|
||||
ddq 0xe0e1e2e3e4e5e6e7e8e9eaebecedeeef
|
||||
dq 0xf8f9fafbfcfdfeff, 0xf0f1f2f3f4f5f6f7
|
||||
dq 0xe8e9eaebecedeeef, 0xe0e1e2e3e4e5e6e7
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_6vect_mad_avx2, 04, 01, 0211
|
||||
|
@ -398,9 +398,9 @@ section .data
|
||||
|
||||
align 16
|
||||
|
||||
mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
mask0f: dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
constip16:
|
||||
ddq 0xf0f1f2f3f4f5f6f7f8f9fafbfcfdfeff
|
||||
dq 0xf8f9fafbfcfdfeff, 0xf0f1f2f3f4f5f6f7
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_6vect_mad_sse, 00, 01, 020f
|
||||
|
@ -265,7 +265,7 @@ section .data
|
||||
align 16
|
||||
|
||||
mask0f:
|
||||
ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_vect_dot_prod_avx, 02, 05, 0061
|
||||
|
@ -265,7 +265,7 @@ section .data
|
||||
|
||||
align 16
|
||||
|
||||
mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
mask0f: dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_vect_dot_prod_sse, 00, 05, 0060
|
||||
|
@ -190,7 +190,7 @@ section .data
|
||||
|
||||
align 16
|
||||
|
||||
mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
mask0f: dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_vect_mad_avx, 02, 01, 0201
|
||||
|
@ -191,7 +191,7 @@ section .data
|
||||
|
||||
align 16
|
||||
|
||||
mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
mask0f: dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_vect_mad_sse, 00, 01, 0200
|
||||
|
@ -158,7 +158,7 @@ section .data
|
||||
align 16
|
||||
|
||||
mask0f:
|
||||
ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_vect_mul_avx, 01, 03, 0036
|
||||
|
@ -164,7 +164,7 @@ section .data
|
||||
|
||||
align 16
|
||||
mask0f:
|
||||
ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f
|
||||
dq 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion gf_vect_mul_sse, 00, 03, 0034
|
||||
|
@ -41,7 +41,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __WIN32__
|
||||
#ifdef _WIN32
|
||||
#ifdef __MINGW32__
|
||||
# include <_mingw.h>
|
||||
#endif
|
||||
|
28
make.inc
28
make.inc
@ -80,7 +80,7 @@ ifeq ($(arch),mingw)
|
||||
endif
|
||||
|
||||
|
||||
INCLUDE = $(patsubst %,-I%,$(subst :, ,$(VPATH)))
|
||||
INCLUDE = $(patsubst %,-I%/,$(subst :, ,$(VPATH)))
|
||||
CFLAGS = $(CFLAGS_$(arch)) $(CFLAGS_$(CC)) $(DEBUG) -O2 $(DEFINES) $(INCLUDE)
|
||||
ASFLAGS = $(ASFLAGS_$(arch)) $(ASFLAGS_$(CC)) $(DEBUG_$(AS)) $(DEFINES) $(INCLUDE)
|
||||
ARFLAGS = $(ARFLAGS_$(arch))
|
||||
@ -110,35 +110,31 @@ perf_testswin64 = $(perf_tests)
|
||||
# Build and run unit tests, performance tests, etc.
|
||||
all_tests = $(notdir $(sort $(perf_tests$(arch)) $(check_tests$(arch)) $(unit_tests$(arch)) $(examples$(arch)) $(other_tests)))
|
||||
all_unit_tests = $(notdir $(sort $(check_tests$(arch)) $(unit_tests$(arch))))
|
||||
all_perf_tests = $(notdir $(sort $(perf_tests$(arch))))
|
||||
|
||||
$(all_unit_tests): % : %.c $(lib_name)
|
||||
$(sort $(notdir $(perf_tests$(arch)))): % : %.c $(lib_name)
|
||||
$(sort $(examples$(arch))): % : %.c $(lib_name)
|
||||
$(sort $(other_tests)): % : %.c $(lib_name)
|
||||
$(all_perf_tests): % : %.c $(lib_name)
|
||||
$(sort $(notdir $(examples$(arch)))): % : %.c $(lib_name)
|
||||
$(sort $(notdir $(other_tests))): % : %.c $(lib_name)
|
||||
|
||||
sim test trace: $(addsuffix .run,$(all_unit_tests))
|
||||
|
||||
perf: $(addsuffix .run,$(notdir $(perf_tests$(arch))))
|
||||
ex: $(examples$(arch))
|
||||
perf: $(addsuffix .run,$(all_perf_tests))
|
||||
ex: $(notdir $(examples$(arch)))
|
||||
all: lib $(all_tests)
|
||||
other: $(other_tests)
|
||||
other: $(notdir $(other_tests))
|
||||
tests: $(all_unit_tests)
|
||||
perfs: $(notdir $(perf_tests$(arch)))
|
||||
perfs: $(all_perf_tests)
|
||||
check test perf: SIM=
|
||||
trace: SIMFLAGS = -debugtrace
|
||||
check test sim:
|
||||
@echo Finished running $@
|
||||
|
||||
#$(foreach c, $^, ./$c )
|
||||
#for i in $^; do ./$$i ; done
|
||||
|
||||
$(objs): | $(O)
|
||||
$(O): ; mkdir -p $(O)
|
||||
|
||||
|
||||
# Build rule to run tests
|
||||
%.run: %
|
||||
$(SIM) $(@D)/$<
|
||||
$(addsuffix .run,$(all_tests)): %.run : %
|
||||
$(SIM) ./$<
|
||||
@echo Completed run: $<
|
||||
|
||||
# Other build rules
|
||||
@ -233,7 +229,7 @@ rpt_name = perf_report_$(shell uname -n)_$(shell date +%y%m%d).perf
|
||||
|
||||
perf_report:
|
||||
echo Results for $(rpt_name) >> $(rpt_name)
|
||||
$(MAKE) -k perf | tee -a $(rpt_name)
|
||||
$(MAKE) -f Makefile.unx -k perf | tee -a $(rpt_name)
|
||||
@echo Summary:
|
||||
-grep runtime $(rpt_name)
|
||||
|
||||
|
47
tools/nasm-filter.sh
Executable file
47
tools/nasm-filter.sh
Executable file
@ -0,0 +1,47 @@
|
||||
#/bin/sh
|
||||
|
||||
# Filter out unnecessary options added by automake
|
||||
|
||||
while [ -n "$*" ]; do
|
||||
case "$1" in
|
||||
-f | -o | -D )
|
||||
# Supported options with arg
|
||||
options="$options $1 $2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-I | -i )
|
||||
options="$options $1 $2/"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
--prefix* )
|
||||
# Supported options without arg
|
||||
options="$options $1"
|
||||
shift
|
||||
;;
|
||||
-I* | -i* )
|
||||
options="$options $1/"
|
||||
shift
|
||||
;;
|
||||
-D* ) # For defines we need to remove spaces
|
||||
case "$1" in
|
||||
*' '* ) ;;
|
||||
*) options="$options $1" ;;
|
||||
esac
|
||||
shift
|
||||
;;
|
||||
#-blah )
|
||||
# Unsupported options with args - none known
|
||||
-* )
|
||||
# Unsupported options with no args
|
||||
shift
|
||||
;;
|
||||
* )
|
||||
args="$args $1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
nasm $options $args
|
@ -15,6 +15,13 @@ while [ -n "$*" ]; do
|
||||
options="$options $1"
|
||||
shift
|
||||
;;
|
||||
-D* ) # For defines we need to remove spaces
|
||||
case "$1" in
|
||||
*' '* ) ;;
|
||||
*) options="$options $1" ;;
|
||||
esac
|
||||
shift
|
||||
;;
|
||||
#-blah )
|
||||
# Unsupported options with args - none known
|
||||
-* )
|
||||
|
Loading…
Reference in New Issue
Block a user