1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-23 04:30:10 +00:00

Refined the hints about making new test reference files.

This commit is contained in:
Greg King 2020-11-17 15:06:05 -05:00
parent b0497f40b2
commit 5ba16654a3
2 changed files with 9 additions and 10 deletions

View File

@ -60,7 +60,7 @@ $(foreach cpu,$(OPCODE_CPUS),$(eval $(call OPCODE_template,$(cpu))))
define CPUDETECT_template define CPUDETECT_template
$(WORKDIR)/$1-cpudetect.bin: cpudetect.s $(ISEQUAL) $(WORKDIR)/$1-cpudetect.bin: cpudetect.s $1-cpudetect.ref $(ISEQUAL)
$(if $(QUIET),echo asm/$1-cpudetect.bin) $(if $(QUIET),echo asm/$1-cpudetect.bin)
$(CA65) -t none --cpu $1 -l $$(@:.bin=.lst) -o $$(@:.bin=.o) $$< $(CA65) -t none --cpu $1 -l $$(@:.bin=.lst) -o $$(@:.bin=.o) $$<
$(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib $(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib

View File

@ -1,4 +1,3 @@
Assembler Testcases Assembler Testcases
=================== ===================
@ -7,7 +6,7 @@ Opcode Tests:
These testcases are inspired by the ones now removed from test/assembler. These testcases are inspired by the ones now removed from test/assembler.
The main purpose is to have each possible opcode generated at least once, The main purpose is to have each possible opcode generated at least once,
either by an assembly instruction or a ".byte"-placeholder. Typically either by an Assembly instruction or a ".byte"-placeholder. Typically
generated by disassembling a binary dump that contains data in the form generated by disassembling a binary dump that contains data in the form
of the pattern that each opcode is stated once in order followed by easy of the pattern that each opcode is stated once in order followed by easy
to recognise: to recognise:
@ -28,21 +27,21 @@ m740 instructions set.
Still to do is to find a way to implement an opcode testcase for the 65816 Still to do is to find a way to implement an opcode testcase for the 65816
processor, since it's capable of executing instructions with an 8-bit and processor, since it's capable of executing instructions with an 8-bit and
a 16-bit operator alike, only distinguished by one processor flag. a 16-bit operator alike, distinguished by only one processor flag.
CPU detect Tests CPU Detect Tests
---------------- ----------------
These tests all assemble the same file "cpudetect.s" which contains several These tests all assemble the same file "cpudetect.s" which contains several
conditionals for several CPUs, only using every option known to the "--cpu" conditionals for several CPUs, only using every option known to the "--cpu"
commandline switch of ca65/cl65. command-line switch of ca65/cl65.
Reference (".ref") Files Reference (".ref") Files
------------------------ ------------------------
A hint on creating these files: when running the test, it will fail due to Some hints about creating new files:
the missing ".ref" file. Review the output of the ".lst" very pedantic, then Make an empty file with the CPU's name prepended to "-cpudetect.ref". Run the
copy the ".bin" to the ".ref" file. tests; one of them will fail due to a mismatch. Review the output of the
".lst" file pedantically, then copy the ".bin" over the empty ".ref" file.