ack/lang/cem/ctest/READ_ME

54 lines
2.4 KiB
Plaintext
Raw Normal View History

1985-02-06 21:06:03 +00:00
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
1987-02-26 10:29:12 +00:00
that considers char's as signed quantities.
1985-02-06 21:06:03 +00:00
The expected output in all directories is generated using
1987-02-26 10:29:12 +00:00
32-bit arithmetic. Using 16-bit arithmetic will cause several
1985-02-06 21:06:03 +00:00
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
1987-02-26 10:29:12 +00:00
in the file Out2.std.
1985-02-06 21:06:03 +00:00
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,
1987-02-26 10:29:12 +00:00
but S is used as a shift count and must be less then 32 (16).
1985-02-06 21:06:03 +00:00
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.
1985-02-15 23:11:30 +00:00
If one has a implementation without floating point one can
use the -DNOFLOAT flag.
Most programs use compile time #ifdef's to hide the use of
floating point they make.
Differences are to be expected in the output of such a run.
1987-02-26 10:29:12 +00:00
Look at the file Out2.nf.std or Out4.nf.std to see what can be expected.