47 lines
2.1 KiB
Plaintext
47 lines
2.1 KiB
Plaintext
The test are subdivided into several directories.
|
|
Only the directory ctgen contains more than one program, but it
|
|
is an exception anyhow.
|
|
All other directories contain one program, say test.c.
|
|
It is translated with a file test.cem as result.
|
|
This test is run, producing output on test.cem.r.
|
|
The 'expected' output is distributed on files named test.cem.g.
|
|
The run files in these directories use the makefile in this
|
|
directory to create the ...cem, ....cem.r files.
|
|
After creating the ....cem.r files a diff is run between the .r
|
|
and .g files. The output of these diffs is preceded by the line
|
|
comparing ....cem
|
|
Not all differences are caused by errors.
|
|
Part of the output in the subdirectory ctmargt is a printout
|
|
of the current environment variables. These will differ per
|
|
user.
|
|
The expected output in the directory ctconv is for a compiler
|
|
that considers char's as unsigned quantaties.
|
|
The expected output in all directories is generated using
|
|
16-bit arithmetic, using 32-bit arithmetic will cause several
|
|
discrepancies to occur with the expected output in the ...cem.g
|
|
files.
|
|
|
|
The output of a run with a compiler using 2-bytes int can be found
|
|
in the file out.std.
|
|
|
|
If any other differences with the expected output occur, the error
|
|
causing the diffence has to be rooted out by a person with some
|
|
experience with the kit. Most errors will be caused by the
|
|
backend programs, so looking at the assembly code generated by
|
|
such a backend from EM code is a good strategy when looking for
|
|
a cause.
|
|
|
|
The programs in the directory ctgen are structured somewhat
|
|
differently. This directory contains a file 'OPS' with a
|
|
prototype program. This prototype program performs all C
|
|
arithmetic operations on a few operands. The operands are
|
|
X, Y, S, Z1, Z2. X, Y and S can be arbitrary expressions,
|
|
but S is used as a shift count and must be less then 16 (32).
|
|
Z1 and Z2 must be lvalue's.
|
|
The name ISTART indicates global declarations and LSTART
|
|
indicates local declarations.
|
|
The files ....sed (e.g. test.sed) are used
|
|
to produce legal C programs from the OPS file, in which
|
|
the result of all expressions is printed.
|
|
The programs are run in the way described above.
|