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:
@@ -165,7 +165,7 @@ LIBOBJ_NW = \
|
|||||||
macros/macros.$(O) \
|
macros/macros.$(O) \
|
||||||
\
|
\
|
||||||
nasmlib/ver.$(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/crc32.$(O) nasmlib/crc64.$(O) nasmlib/md5c.$(O) \
|
||||||
nasmlib/string.$(O) nasmlib/nctype.$(O) \
|
nasmlib/string.$(O) nasmlib/nctype.$(O) \
|
||||||
nasmlib/file.$(O) nasmlib/mmap.$(O) nasmlib/ilog2.$(O) \
|
nasmlib/file.$(O) nasmlib/mmap.$(O) nasmlib/ilog2.$(O) \
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
@SET_MAKE@
|
@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
|
# Binary suffixes
|
||||||
O = @OBJEXT@
|
O = @OBJEXT@
|
||||||
@@ -11,7 +12,7 @@ NASM = ../nasm$(X)
|
|||||||
NDISASM = ../ndisasm$(X)
|
NDISASM = ../ndisasm$(X)
|
||||||
OMFDUMP = ../misc/omfdump$(X)
|
OMFDUMP = ../misc/omfdump$(X)
|
||||||
LISTOPT = -L+
|
LISTOPT = -L+
|
||||||
NASMOPT = -Ox -I../misc $(LISTOPT) $(OPT)
|
NASMOPT = -DSRC -Ox -I../misc $(LISTOPT) $(OPT)
|
||||||
PERL = perl
|
PERL = perl
|
||||||
TESTS = $(wildcard *.asm)
|
TESTS = $(wildcard *.asm)
|
||||||
RM_F = rm -f
|
RM_F = rm -f
|
||||||
@@ -30,6 +31,9 @@ $(NASM) $(NDISASM):
|
|||||||
%.bin: %.asm $(NASM)
|
%.bin: %.asm $(NASM)
|
||||||
$(NASM) $(NASMOPT) -f bin -o $@ -MD $@.dep -l $@.lst $<
|
$(NASM) $(NASMOPT) -f bin -o $@ -MD $@.dep -l $@.lst $<
|
||||||
|
|
||||||
|
%.bin32: %.asm $(NASM)
|
||||||
|
|
||||||
|
|
||||||
%.ith: %.asm $(NASM)
|
%.ith: %.asm $(NASM)
|
||||||
$(NASM) $(NASMOPT) -f ith -o $@ -MD $@.dep -l $@.lst $<
|
$(NASM) $(NASMOPT) -f ith -o $@ -MD $@.dep -l $@.lst $<
|
||||||
|
|
||||||
|
@@ -1,6 +1,12 @@
|
|||||||
;Testname=test; Arguments=-fbin -ocrc32.bin; Files=stdout stderr crc32.bin
|
;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,cl
|
||||||
crc32 eax,byte [di]
|
crc32 eax,byte [di]
|
||||||
@@ -9,8 +15,7 @@
|
|||||||
crc32 eax,ecx
|
crc32 eax,ecx
|
||||||
crc32 eax,dword [di]
|
crc32 eax,dword [di]
|
||||||
|
|
||||||
bits 32
|
%elif __?BITS?__ == 32
|
||||||
align 16
|
|
||||||
|
|
||||||
crc32 eax,cl
|
crc32 eax,cl
|
||||||
crc32 eax,byte [edi]
|
crc32 eax,byte [edi]
|
||||||
@@ -19,9 +24,7 @@
|
|||||||
crc32 eax,ecx
|
crc32 eax,ecx
|
||||||
crc32 eax,dword [edi]
|
crc32 eax,dword [edi]
|
||||||
|
|
||||||
bits 64
|
%else
|
||||||
align 16
|
|
||||||
|
|
||||||
crc32 eax,cl
|
crc32 eax,cl
|
||||||
crc32 eax,byte [rdi]
|
crc32 eax,byte [rdi]
|
||||||
crc32 eax,r9b
|
crc32 eax,r9b
|
||||||
@@ -35,3 +38,4 @@
|
|||||||
crc32 rax,rcx
|
crc32 rax,rcx
|
||||||
crc32 rax,qword [rdi]
|
crc32 rax,qword [rdi]
|
||||||
crc32 rax,r9
|
crc32 rax,r9
|
||||||
|
%endif
|
||||||
|
Reference in New Issue
Block a user