From bc4dfc9bbcdee7f60e06a663b2c05d400bf3680a Mon Sep 17 00:00:00 2001 From: Greg Tucker Date: Wed, 18 Nov 2015 15:52:20 -0700 Subject: [PATCH] Convert files to build with nasm or yasm Signed-off-by: Greg Tucker --- Makefile.am | 21 +++++++---- README | 2 +- erasure_code/gf_2vect_dot_prod_avx.asm | 6 ++-- erasure_code/gf_2vect_dot_prod_avx2.asm | 4 +-- erasure_code/gf_2vect_dot_prod_sse.asm | 6 ++-- erasure_code/gf_2vect_mad_avx.asm | 4 +-- erasure_code/gf_2vect_mad_avx2.asm | 2 +- erasure_code/gf_2vect_mad_sse.asm | 2 +- erasure_code/gf_3vect_dot_prod_avx.asm | 2 +- erasure_code/gf_3vect_dot_prod_sse.asm | 2 +- erasure_code/gf_3vect_mad_avx.asm | 4 +-- erasure_code/gf_3vect_mad_avx2.asm | 4 +-- erasure_code/gf_3vect_mad_sse.asm | 4 +-- erasure_code/gf_4vect_dot_prod_avx.asm | 2 +- erasure_code/gf_4vect_dot_prod_sse.asm | 2 +- erasure_code/gf_4vect_mad_avx.asm | 4 +-- erasure_code/gf_4vect_mad_avx2.asm | 4 +-- erasure_code/gf_4vect_mad_sse.asm | 4 +-- erasure_code/gf_5vect_dot_prod_avx.asm | 2 +- erasure_code/gf_5vect_dot_prod_sse.asm | 2 +- erasure_code/gf_5vect_mad_avx.asm | 4 +-- erasure_code/gf_5vect_mad_avx2.asm | 4 +-- erasure_code/gf_5vect_mad_sse.asm | 4 +-- erasure_code/gf_6vect_dot_prod_avx.asm | 2 +- erasure_code/gf_6vect_dot_prod_sse.asm | 2 +- erasure_code/gf_6vect_mad_avx.asm | 4 +-- erasure_code/gf_6vect_mad_avx2.asm | 4 +-- erasure_code/gf_6vect_mad_sse.asm | 4 +-- erasure_code/gf_vect_dot_prod_avx.asm | 2 +- erasure_code/gf_vect_dot_prod_sse.asm | 2 +- erasure_code/gf_vect_mad_avx.asm | 2 +- erasure_code/gf_vect_mad_sse.asm | 2 +- erasure_code/gf_vect_mul_avx.asm | 2 +- erasure_code/gf_vect_mul_sse.asm | 2 +- include/types.h | 2 +- make.inc | 28 +++++++-------- tools/nasm-filter.sh | 47 +++++++++++++++++++++++++ tools/yasm-filter.sh | 7 ++++ 38 files changed, 133 insertions(+), 74 deletions(-) create mode 100755 tools/nasm-filter.sh diff --git a/Makefile.am b/Makefile.am index be201d9..772c3f6 100644 --- a/Makefile.am +++ b/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 " | sed -e 's;include/;;' >> $@; done + @for unit in $(sort $(extern_hdrs)); do echo "#include " | sed -e 's;include/;;' >> $@; done @echo '#endif //_ISAL_H_' >> $@ diff --git a/README b/README index c47e98f..71325d4 100644 --- a/README +++ b/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 ============== diff --git a/erasure_code/gf_2vect_dot_prod_avx.asm b/erasure_code/gf_2vect_dot_prod_avx.asm index dc10461..b905f01 100644 --- a/erasure_code/gf_2vect_dot_prod_avx.asm +++ b/erasure_code/gf_2vect_dot_prod_avx.asm @@ -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 diff --git a/erasure_code/gf_2vect_dot_prod_avx2.asm b/erasure_code/gf_2vect_dot_prod_avx2.asm index 5ec4d2c..2c9fa71 100644 --- a/erasure_code/gf_2vect_dot_prod_avx2.asm +++ b/erasure_code/gf_2vect_dot_prod_avx2.asm @@ -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] diff --git a/erasure_code/gf_2vect_dot_prod_sse.asm b/erasure_code/gf_2vect_dot_prod_sse.asm index 3410531..9f54336 100644 --- a/erasure_code/gf_2vect_dot_prod_sse.asm +++ b/erasure_code/gf_2vect_dot_prod_sse.asm @@ -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 diff --git a/erasure_code/gf_2vect_mad_avx.asm b/erasure_code/gf_2vect_mad_avx.asm index 7e16c91..c5fbf7a 100644 --- a/erasure_code/gf_2vect_mad_avx.asm +++ b/erasure_code/gf_2vect_mad_avx.asm @@ -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 diff --git a/erasure_code/gf_2vect_mad_avx2.asm b/erasure_code/gf_2vect_mad_avx2.asm index c5b76dd..00d8345 100644 --- a/erasure_code/gf_2vect_mad_avx2.asm +++ b/erasure_code/gf_2vect_mad_avx2.asm @@ -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: diff --git a/erasure_code/gf_2vect_mad_sse.asm b/erasure_code/gf_2vect_mad_sse.asm index 8e3e9e5..50e4f61 100644 --- a/erasure_code/gf_2vect_mad_sse.asm +++ b/erasure_code/gf_2vect_mad_sse.asm @@ -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 diff --git a/erasure_code/gf_3vect_dot_prod_avx.asm b/erasure_code/gf_3vect_dot_prod_avx.asm index d2ca3c4..191129d 100644 --- a/erasure_code/gf_3vect_dot_prod_avx.asm +++ b/erasure_code/gf_3vect_dot_prod_avx.asm @@ -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 diff --git a/erasure_code/gf_3vect_dot_prod_sse.asm b/erasure_code/gf_3vect_dot_prod_sse.asm index 13e5343..208aa4a 100644 --- a/erasure_code/gf_3vect_dot_prod_sse.asm +++ b/erasure_code/gf_3vect_dot_prod_sse.asm @@ -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 diff --git a/erasure_code/gf_3vect_mad_avx.asm b/erasure_code/gf_3vect_mad_avx.asm index 23cde37..df6cf4e 100644 --- a/erasure_code/gf_3vect_mad_avx.asm +++ b/erasure_code/gf_3vect_mad_avx.asm @@ -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 diff --git a/erasure_code/gf_3vect_mad_avx2.asm b/erasure_code/gf_3vect_mad_avx2.asm index 55bd5bf..4b8163d 100644 --- a/erasure_code/gf_3vect_mad_avx2.asm +++ b/erasure_code/gf_3vect_mad_avx2.asm @@ -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 diff --git a/erasure_code/gf_3vect_mad_sse.asm b/erasure_code/gf_3vect_mad_sse.asm index 3b5dabe..6458493 100644 --- a/erasure_code/gf_3vect_mad_sse.asm +++ b/erasure_code/gf_3vect_mad_sse.asm @@ -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 diff --git a/erasure_code/gf_4vect_dot_prod_avx.asm b/erasure_code/gf_4vect_dot_prod_avx.asm index b3d09dc..6947076 100644 --- a/erasure_code/gf_4vect_dot_prod_avx.asm +++ b/erasure_code/gf_4vect_dot_prod_avx.asm @@ -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 diff --git a/erasure_code/gf_4vect_dot_prod_sse.asm b/erasure_code/gf_4vect_dot_prod_sse.asm index c0e0e6f..aebda83 100644 --- a/erasure_code/gf_4vect_dot_prod_sse.asm +++ b/erasure_code/gf_4vect_dot_prod_sse.asm @@ -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 diff --git a/erasure_code/gf_4vect_mad_avx.asm b/erasure_code/gf_4vect_mad_avx.asm index 65d6437..6ca31bb 100644 --- a/erasure_code/gf_4vect_mad_avx.asm +++ b/erasure_code/gf_4vect_mad_avx.asm @@ -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 diff --git a/erasure_code/gf_4vect_mad_avx2.asm b/erasure_code/gf_4vect_mad_avx2.asm index 01dd208..9368e42 100644 --- a/erasure_code/gf_4vect_mad_avx2.asm +++ b/erasure_code/gf_4vect_mad_avx2.asm @@ -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 diff --git a/erasure_code/gf_4vect_mad_sse.asm b/erasure_code/gf_4vect_mad_sse.asm index 31abdc1..7c41cac 100644 --- a/erasure_code/gf_4vect_mad_sse.asm +++ b/erasure_code/gf_4vect_mad_sse.asm @@ -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 diff --git a/erasure_code/gf_5vect_dot_prod_avx.asm b/erasure_code/gf_5vect_dot_prod_avx.asm index 93cf347..945c8de 100644 --- a/erasure_code/gf_5vect_dot_prod_avx.asm +++ b/erasure_code/gf_5vect_dot_prod_avx.asm @@ -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 diff --git a/erasure_code/gf_5vect_dot_prod_sse.asm b/erasure_code/gf_5vect_dot_prod_sse.asm index bbb468a..2b01bf4 100644 --- a/erasure_code/gf_5vect_dot_prod_sse.asm +++ b/erasure_code/gf_5vect_dot_prod_sse.asm @@ -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 diff --git a/erasure_code/gf_5vect_mad_avx.asm b/erasure_code/gf_5vect_mad_avx.asm index 9493903..0a7157f 100644 --- a/erasure_code/gf_5vect_mad_avx.asm +++ b/erasure_code/gf_5vect_mad_avx.asm @@ -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 diff --git a/erasure_code/gf_5vect_mad_avx2.asm b/erasure_code/gf_5vect_mad_avx2.asm index bbcd68d..48488cf 100644 --- a/erasure_code/gf_5vect_mad_avx2.asm +++ b/erasure_code/gf_5vect_mad_avx2.asm @@ -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 diff --git a/erasure_code/gf_5vect_mad_sse.asm b/erasure_code/gf_5vect_mad_sse.asm index 5be5b6e..12e8619 100644 --- a/erasure_code/gf_5vect_mad_sse.asm +++ b/erasure_code/gf_5vect_mad_sse.asm @@ -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 diff --git a/erasure_code/gf_6vect_dot_prod_avx.asm b/erasure_code/gf_6vect_dot_prod_avx.asm index f8cf7d6..1d45ef6 100644 --- a/erasure_code/gf_6vect_dot_prod_avx.asm +++ b/erasure_code/gf_6vect_dot_prod_avx.asm @@ -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 diff --git a/erasure_code/gf_6vect_dot_prod_sse.asm b/erasure_code/gf_6vect_dot_prod_sse.asm index d37a0f0..97b4363 100644 --- a/erasure_code/gf_6vect_dot_prod_sse.asm +++ b/erasure_code/gf_6vect_dot_prod_sse.asm @@ -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 diff --git a/erasure_code/gf_6vect_mad_avx.asm b/erasure_code/gf_6vect_mad_avx.asm index ba632b4..1462882 100644 --- a/erasure_code/gf_6vect_mad_avx.asm +++ b/erasure_code/gf_6vect_mad_avx.asm @@ -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 diff --git a/erasure_code/gf_6vect_mad_avx2.asm b/erasure_code/gf_6vect_mad_avx2.asm index 67984b9..c625b71 100644 --- a/erasure_code/gf_6vect_mad_avx2.asm +++ b/erasure_code/gf_6vect_mad_avx2.asm @@ -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 diff --git a/erasure_code/gf_6vect_mad_sse.asm b/erasure_code/gf_6vect_mad_sse.asm index d693022..52e328a 100644 --- a/erasure_code/gf_6vect_mad_sse.asm +++ b/erasure_code/gf_6vect_mad_sse.asm @@ -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 diff --git a/erasure_code/gf_vect_dot_prod_avx.asm b/erasure_code/gf_vect_dot_prod_avx.asm index 28938b4..8bf8671 100644 --- a/erasure_code/gf_vect_dot_prod_avx.asm +++ b/erasure_code/gf_vect_dot_prod_avx.asm @@ -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 diff --git a/erasure_code/gf_vect_dot_prod_sse.asm b/erasure_code/gf_vect_dot_prod_sse.asm index 417d143..18e36da 100644 --- a/erasure_code/gf_vect_dot_prod_sse.asm +++ b/erasure_code/gf_vect_dot_prod_sse.asm @@ -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 diff --git a/erasure_code/gf_vect_mad_avx.asm b/erasure_code/gf_vect_mad_avx.asm index ffe828b..877cc7f 100644 --- a/erasure_code/gf_vect_mad_avx.asm +++ b/erasure_code/gf_vect_mad_avx.asm @@ -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 diff --git a/erasure_code/gf_vect_mad_sse.asm b/erasure_code/gf_vect_mad_sse.asm index e7bd352..24517ff 100644 --- a/erasure_code/gf_vect_mad_sse.asm +++ b/erasure_code/gf_vect_mad_sse.asm @@ -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 diff --git a/erasure_code/gf_vect_mul_avx.asm b/erasure_code/gf_vect_mul_avx.asm index 10caa36..651a090 100644 --- a/erasure_code/gf_vect_mul_avx.asm +++ b/erasure_code/gf_vect_mul_avx.asm @@ -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 diff --git a/erasure_code/gf_vect_mul_sse.asm b/erasure_code/gf_vect_mul_sse.asm index 3992d5f..5453ebb 100644 --- a/erasure_code/gf_vect_mul_sse.asm +++ b/erasure_code/gf_vect_mul_sse.asm @@ -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 diff --git a/include/types.h b/include/types.h index b49f0d8..41d5355 100644 --- a/include/types.h +++ b/include/types.h @@ -41,7 +41,7 @@ extern "C" { #endif -#ifdef __WIN32__ +#ifdef _WIN32 #ifdef __MINGW32__ # include <_mingw.h> #endif diff --git a/make.inc b/make.inc index 4af2ce2..a5a7a02 100644 --- a/make.inc +++ b/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) diff --git a/tools/nasm-filter.sh b/tools/nasm-filter.sh new file mode 100755 index 0000000..5ec9ba3 --- /dev/null +++ b/tools/nasm-filter.sh @@ -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 diff --git a/tools/yasm-filter.sh b/tools/yasm-filter.sh index 2c2ccd3..c33952a 100755 --- a/tools/yasm-filter.sh +++ b/tools/yasm-filter.sh @@ -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 -* )