READ_ME 2.6 KB

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