0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-09-22 10:43:39 -04:00

test: add -DSRC as a standard option; bin32 and bin64 targets

Make it a little easier to run bench tests which include multiple bit
sizes, and add the SRC define to make SRC/BIN tests easier to run on
the bench.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin
2025-09-05 12:53:37 -07:00
parent ac93d75da3
commit f39677d527
3 changed files with 17 additions and 9 deletions

View File

@@ -165,7 +165,7 @@ LIBOBJ_NW = \
macros/macros.$(O) \
\
nasmlib/ver.$(O) \
nasmlib/alloc.$(O) nasmlib/asprintf.$(O) nasmlib/errfile.$(O) \
nasmlib/alloc.$(O) nasmlib/asprintf.$(O) \
nasmlib/crc32.$(O) nasmlib/crc64.$(O) nasmlib/md5c.$(O) \
nasmlib/string.$(O) nasmlib/nctype.$(O) \
nasmlib/file.$(O) nasmlib/mmap.$(O) nasmlib/ilog2.$(O) \

View File

@@ -1,6 +1,7 @@
@SET_MAKE@
.SUFFIXES: .bin .o .o64 .aout .aoutb .obj .obj64 .exe .asm .lst .pl
.SUFFIXES: .bin .bin32 .bin64 .o .o64 .aout .aoutb .obj .obj64 \
.exe .asm .lst .pl
# Binary suffixes
O = @OBJEXT@
@@ -11,7 +12,7 @@ NASM = ../nasm$(X)
NDISASM = ../ndisasm$(X)
OMFDUMP = ../misc/omfdump$(X)
LISTOPT = -L+
NASMOPT = -Ox -I../misc $(LISTOPT) $(OPT)
NASMOPT = -DSRC -Ox -I../misc $(LISTOPT) $(OPT)
PERL = perl
TESTS = $(wildcard *.asm)
RM_F = rm -f
@@ -30,6 +31,9 @@ $(NASM) $(NDISASM):
%.bin: %.asm $(NASM)
$(NASM) $(NASMOPT) -f bin -o $@ -MD $@.dep -l $@.lst $<
%.bin32: %.asm $(NASM)
%.ith: %.asm $(NASM)
$(NASM) $(NASMOPT) -f ith -o $@ -MD $@.dep -l $@.lst $<

View File

@@ -1,6 +1,12 @@
;Testname=test; Arguments=-fbin -ocrc32.bin; Files=stdout stderr crc32.bin
bits 16
%ifndef BITS
%define BITS 64
%endif
bits BITS
%if __?BITS?__ == 16
crc32 eax,cl
crc32 eax,byte [di]
@@ -9,8 +15,7 @@
crc32 eax,ecx
crc32 eax,dword [di]
bits 32
align 16
%elif __?BITS?__ == 32
crc32 eax,cl
crc32 eax,byte [edi]
@@ -19,9 +24,7 @@
crc32 eax,ecx
crc32 eax,dword [edi]
bits 64
align 16
%else
crc32 eax,cl
crc32 eax,byte [rdi]
crc32 eax,r9b
@@ -35,3 +38,4 @@
crc32 rax,rcx
crc32 rax,qword [rdi]
crc32 rax,r9
%endif