em_mes.3 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. .TH EM_MES 3 "$Revision$"
  2. .ad
  3. .SH NAME
  4. em_mes \- EM-message generating routines
  5. .SH SYNOPSIS
  6. .nf
  7. .B #include <em.h>
  8. .PP
  9. .B void C_ms_err()
  10. .PP
  11. .B void C_ms_opt()
  12. .PP
  13. .B void C_ms_emx(wsiz, psiz)
  14. .B arith wsiz, psiz;
  15. .PP
  16. .B #include <em_reg.h>
  17. .B void C_ms_reg(offs, siz, class, prior)
  18. .B arith offs, siz;
  19. .B int class, prior;
  20. .PP
  21. .B void C_ms_src(nlines, filnam)
  22. .B int nlines;
  23. .B char *filnam;
  24. .PP
  25. .B void C_ms_flt()
  26. .PP
  27. .B void C_ms_com(str)
  28. .B char *str;
  29. .PP
  30. .B void C_ms_par(nparams)
  31. .B arith nparams;
  32. .PP
  33. .B #include <em_ego.h>
  34. .B void C_ms_ego(hint, offs, siz, regno)
  35. .B int hint, regno;
  36. .B arith offs, siz;
  37. .PP
  38. .B void C_ms_gto()
  39. .PP
  40. .B void C_ms_stb_cst(s, e1, e2, e3)
  41. .B char *s;
  42. .B int e1, e2;
  43. .B arith e3;
  44. .PP
  45. .B void C_ms_stb_dlb(s, e1, e2, l, off)
  46. .B char *s;
  47. .B int e1, e2;
  48. .B label l;
  49. .B arith off;
  50. .PP
  51. .B void C_ms_stb_dnam(s, e1, e2, l, off)
  52. .B char *s;
  53. .B int e1, e2;
  54. .B char *l;
  55. .B arith off;
  56. .PP
  57. .B void C_ms_stb_ilb(s, e1, e2, l)
  58. .B char *s;
  59. .B int e1, e2;
  60. .B label l;
  61. .PP
  62. .B void C_ms_stb_pnam(s, e1, e2, p)
  63. .B char *s;
  64. .B int e1, e2;
  65. .B char *p;
  66. .PP
  67. .B void C_ms_std(s, e1, l)
  68. .B char *s;
  69. .B int e1;
  70. .B int l;
  71. .fi
  72. .SH DESCRIPTION
  73. This set of routines forms a front end for the
  74. .IR em_code (3)
  75. module.
  76. The philosophy behind this package is to provide a single routine for
  77. each type of EM message that is generated by a front-end compiler.
  78. Each routine internally builds a message instruction by using the
  79. .BR C_mes_begin ,
  80. .B C_mes_end
  81. and the
  82. .BI C_ cstp
  83. routines from the
  84. .I em_code
  85. module.
  86. The actions taken by these functions depend on the type of
  87. .I em_code
  88. module that is loaded together with this module.
  89. The routines described here do not prevent the user from directly
  90. composing EM messages himself.
  91. .PP
  92. .BR C_ms_err ()
  93. generates a message that indicates some error during the compilation.
  94. .PP
  95. .BR C_ms_opt ()
  96. causes any optimization to be suppressed.
  97. .PP
  98. .BR C_ms_emx ()
  99. indicates the wordsize
  100. .I wsiz
  101. and pointersize
  102. .IR psiz .
  103. This must be the first code generated, or the generated code is illegal.
  104. .PP
  105. .BR C_ms_reg ()
  106. can be used to indicate that a local variable, having offset
  107. .I offs
  108. and size (in bytes)
  109. .IR siz ,
  110. may be stored in a register.
  111. .I Class
  112. indicates the use of the variable.
  113. The following classes are allowed (the names are defined in em_reg.h):
  114. .RS
  115. .IP reg_any 12
  116. no specific type
  117. .IP reg_loop 12
  118. loop control variable
  119. .IP reg_pointer 12
  120. pointer variable
  121. .IP reg_float 12
  122. floating point variable
  123. .LP
  124. .RE
  125. .I Prior
  126. is taken to be the priority of the variable; higher numbers indicate
  127. better candidates.
  128. .PP
  129. .BR C_ms_src ()
  130. produces an indication of the number of source lines,
  131. .IR nlines ,
  132. in file
  133. .IR filnam .
  134. This information can be used by a profiler.
  135. .PP
  136. .BR C_ms_flt ()
  137. produces an indication that floating-point operations are used.
  138. .PP
  139. .BR C_ms_com ()
  140. causes the string
  141. .I str
  142. to be inserted as comment in the resulting output.
  143. Note that this routine does not provide the full semantics of EM in this
  144. area, but the user himself can build a comment message with other types
  145. of comment if he likes.
  146. .PP
  147. .BR C_ms_par ()
  148. produces an indication that no more than
  149. .I nbytes
  150. of parameters are accessed, either directly or indirectly.
  151. .PP
  152. .BR C_ms_ego ()
  153. produces a hint from the EM global optimizer.
  154. The parameters needed are conform to the format of the message.
  155. .PP
  156. .BR C_ms_gto ()
  157. can be invoked to indicate that a procedure uses a non-local goto.
  158. .PP
  159. The
  160. .B C_ms_stb
  161. and
  162. .B C_ms_std
  163. routines produce a message that a back-end can use for (debugger) symbol table
  164. entries.
  165. .SH FILES
  166. .nf
  167. ~em/modules/h/em.h
  168. ~em/h/em_reg.h
  169. ~em/h/em_ego.h
  170. ~em/modules/lib/libem_mes.a
  171. .fi
  172. .SH MODULES
  173. em_code(3)
  174. .SH SEE ALSO
  175. em_code(3), read_em(3)
  176. .SH DIAGNOSTICS
  177. None of the functions return a value.
  178. .SH REMARKS
  179. There is no
  180. .BR C_ms_ext ()
  181. routine, since this message uses a variable number of arguments.