READ_ME 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. The test are subdivided into several directories.
  2. Only the directory ctgen contains more than one program, but it
  3. is an exception anyhow.
  4. All other directories contain one program, say test.c.
  5. It is translated with a file test.cem as result.
  6. This test is run, producing output on test.cem.r.
  7. The 'expected' output is distributed on files named test.cem.g.
  8. The run files in these directories use the makefile in this
  9. directory to create the ...cem, ....cem.r files.
  10. After creating the ....cem.r files a diff is run between the .r
  11. and .g files. The output of these diffs is preceded by the line
  12. comparing ....cem
  13. Not all differences are caused by errors.
  14. Part of the output in the subdirectory ctmargt is a printout
  15. of the current environment variables. These will differ per
  16. user.
  17. The expected output in the directory ctconv is for a compiler
  18. that considers char's as signed quantities.
  19. The expected output in all directories is generated using
  20. 32-bit arithmetic. Using 16-bit arithmetic will cause several
  21. discrepancies to occur with the expected output in the ...cem.g
  22. files.
  23. The output of a run with a compiler using 2-bytes int can be found
  24. in the file Out2.std.
  25. If any other differences with the expected output occur, the error
  26. causing the diffence has to be rooted out by a person with some
  27. experience with the kit. Most errors will be caused by the
  28. backend programs, so looking at the assembly code generated by
  29. such a backend from EM code is a good strategy when looking for
  30. a cause.
  31. The programs in the directory ctgen are structured somewhat
  32. differently. This directory contains a file 'OPS' with a
  33. prototype program. This prototype program performs all C
  34. arithmetic operations on a few operands. The operands are
  35. X, Y, S, Z1, Z2. X, Y and S can be arbitrary expressions,
  36. but S is used as a shift count and must be less then 32 (16).
  37. Z1 and Z2 must be lvalue's.
  38. The name ISTART indicates global declarations and LSTART
  39. indicates local declarations.
  40. The files ....sed (e.g. test.sed) are used
  41. to produce legal C programs from the OPS file, in which
  42. the result of all expressions is printed.
  43. The programs are run in the way described above.
  44. If one has a implementation without floating point one can
  45. use the -DNOFLOAT flag.
  46. Most programs use compile time #ifdef's to hide the use of
  47. floating point they make.
  48. Differences are to be expected in the output of such a run.
  49. Look at the file Out2.nf.std or Out4.nf.std to see what can be expected.