put.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* $Id$ */
  2. /*
  3. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  4. * See the copyright notice in the ACK home directory, in the file "Copyright".
  5. */
  6. /* O U T P U T R O U T I N E S */
  7. extern FILE *curoutp; /* current output file */
  8. #define outbyte(b) putc(b,curoutp)
  9. void outshort(short i);
  10. /* Write a short to curoutp
  11. */
  12. void outoff(offset off);
  13. /* Write an offset to curoutp
  14. */
  15. void outproc(proc_p p);
  16. /* Write a procid to curoutp
  17. */
  18. void putdtable(dblock_p head, FILE *df);
  19. /* Write the data block table to file df,
  20. * preceded by its length.
  21. */
  22. void putptable(proc_p head, FILE *pf, bool all);
  23. /* Write the proc table to file pf,
  24. * preceded by its length. If all=false,
  25. * the fields computed by CF will not be
  26. * written (used by the IC phase).
  27. */
  28. void putunit(short kind, proc_p p, line_p l, FILE *gf, FILE *lf);
  29. /* If kind = LTEXT, then write
  30. * the control flow graph to file gf,
  31. * preceded by its length (#basic blocks);
  32. * write the EM code of every basic block
  33. * in the graph to file lf, preceded by
  34. * the number of instructions in the block.
  35. * Else, (kind = LDATA) just write the
  36. * list of instructions (data declarations)
  37. * to lf.
  38. */
  39. short putlines(line_p l, FILE *lf);
  40. /* Output the list of em instructions
  41. * headed by l. Return the number of
  42. * instructions written.
  43. */