ack/modules/src/em_mes/em_mes.3
1990-06-20 11:59:57 +00:00

180 lines
3.7 KiB
Groff

.TH EM_MES 3ACK "86/03/18"
.ad
.SH NAME
em_mes \- EM-message generating routines
.SH SYNOPSIS
.nf
.B #include <em.h>
.PP
.B C_ms_err()
.PP
.B C_ms_opt()
.PP
.B C_ms_emx(wsiz, psiz)
.B arith wsiz, psiz;
.PP
.B #include <em_reg.h>
.B C_ms_reg(offs, siz, class, prior)
.B arith offs, siz;
.B int class, prior;
.PP
.B C_ms_src(nlines, filnam)
.B int nlines;
.B char *filnam;
.PP
.B C_ms_flt()
.PP
.B C_ms_com(str)
.B char *str;
.PP
.B C_ms_par(nparams)
.B arith nparams;
.PP
.B #include <em_ego.h>
.B C_ms_ego(hint, offs, siz, regno)
.B int hint, regno;
.B arith offs, siz;
.PP
.B C_ms_gto()
.PP
.B C_ms_stb_cst(s, e1, e2, e3)
.B char *s;
.B int e1, e2;
.B arith e3;
.PP
.B C_ms_stb_dlb(s, e1, e2, l, off)
.B char *s;
.B int e1, e2;
.B label l;
.B arith off;
.PP
.B C_ms_stb_dnam(s, e1, e2, l, off)
.B char *s;
.B int e1, e2;
.B char *l;
.B arith off;
.PP
.B C_ms_stb_ilb(s, e1, e2, l)
.B char *s;
.B int e1, e2;
.B label l;
.PP
.B C_ms_stb_pnam(s, e1, e2, p)
.B char *s;
.B int e1, e2;
.B char *p;
.PP
.B C_ms_lin(l)
.B int l;
.fi
.SH DESCRIPTION
This set of routines forms a front end for the
.IR em_code (3)
module.
The philosophy behind this package is to provide a single routine for
each type of EM message that is generated by a front-end compiler.
Each routine internally builds a message instruction by using the
.BR C_mes_begin ,
.B C_mes_end
and the
.BI C_ cstp
routines from the
.I em_code
module.
The actions taken by these functions depend on the type of
.I em_code
module that is loaded together with this module.
The routines described here do not prevent the user from directly
composing EM messages himself.
.PP
.BR C_ms_err ()
generates a message that indicates some error during the compilation.
.PP
.BR C_ms_opt ()
causes any optimization to be suppressed.
.PP
.BR C_ms_emx ()
indicates the wordsize
.I wsiz
and pointersize
.IR psiz .
This must be the first code generated, or the generated code is illegal.
.PP
.BR C_ms_reg ()
can be used to indicate that a local variable, having offset
.I offs
and size (in bytes)
.IR siz ,
may be stored in a register.
.I Class
indicates the use of the variable.
The following classes are allowed (the names are defined in em_reg.h):
.RS
.IP reg_any 12
no specific type
.IP reg_loop 12
loop control variable
.IP reg_pointer 12
pointer variable
.IP reg_float 12
floating point variable
.LP
.RE
.I Prior
is taken to be the priority of the variable; higher numbers indicate
better candidates.
.PP
.BR C_ms_src ()
produces an indication of the number of source lines,
.IR nlines ,
in file
.IR filnam .
This information can be used by a profiler.
.PP
.BR C_ms_flt ()
produces an indication that floating-point operations are used.
.PP
.BR C_ms_com ()
causes the string
.I str
to be inserted as comment in the resulting output.
Note that this routine does not provide the full semantics of EM in this
area, but the user himself can build a comment message with other types
of comment if he likes.
.PP
.BR C_ms_par ()
produces an indication that no more than
.I nbytes
of parameters are accessed, either directly or indirectly.
.PP
.BR C_ms_ego ()
produces a hint from the EM global optimizer.
The parameters needed are conform to the format of the message.
.PP
.BR C_ms_gto ()
can be invoked to indicate that a procedure uses a non-local goto.
.PP
The
.B C_ms_stb
and
.B C_ms_lin
routines produce a message that a back-end can use for (debugger) symbol table
entries.
.SH FILES
.nf
~em/modules/h/em.h
~em/h/em_reg.h
~em/h/em_ego.h
~em/modules/lib/libem_mes.a
.fi
.SH MODULES
em_code(3)
.SH SEE ALSO
em_code(3), read_em(3)
.SH DIAGNOSTICS
None of the functions return a value.
.SH BUGS
The
.BR C_ms_ext ()
routine has not yet been implemented, since this message uses
a variable number of arguments.