62d8930080
the README file
58 lines
2.5 KiB
Plaintext
58 lines
2.5 KiB
Plaintext
To run this test, first copy makefile.std to makefile, and adapt the
|
|
CEM variable; set it to the compiler you want to test.
|
|
Then type: sh run > out 2>&1 &
|
|
|
|
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 signed quantities.
|
|
The expected output in all directories is generated using
|
|
32-bit arithmetic. Using 16-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 Out2.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 32 (16).
|
|
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.
|
|
|
|
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.
|
|
Look at the file Out2.nf.std or Out4.nf.std to see what can be expected.
|