EM_MES(3)

NAME
em_mes - EM-message generating routines

SYNOPSIS
#include <em.h>

void C_ms_err()

void C_ms_opt()

void C_ms_emx(wsiz, psiz)
arith wsiz, psiz;

#include <em_reg.h>
void C_ms_reg(offs, siz, class, prior)
arith offs, siz;
int class, prior;

void C_ms_src(nlines, filnam)
int nlines;
char *filnam;

void C_ms_flt()

void C_ms_com(str)
char *str;

void C_ms_par(nparams)
arith nparams;

#include <em_ego.h>
void C_ms_ego(hint, offs, siz, regno)
int hint, regno;
arith offs, siz;

void C_ms_gto()

void C_ms_stb_cst(s, e1, e2, e3)
char *s;
int e1, e2;
arith e3;

void C_ms_stb_dlb(s, e1, e2, l, off)
char *s;
int e1, e2;
label l;
arith off;

void C_ms_stb_dnam(s, e1, e2, l, off)
char *s;
int e1, e2;
char *l;
arith off;

void C_ms_stb_ilb(s, e1, e2, l)
char *s;
int e1, e2;
label l;

void C_ms_stb_pnam(s, e1, e2, p)
char *s;
int e1, e2;
char *p;

void C_ms_std(s, e1, l)
char *s;
int e1;
int l;

DESCRIPTION
This set of routines forms a front end for the 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 C_mes_begin, C_mes_end and the C_cstp routines from the em_code module. The actions taken by these functions depend on the type of 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.

C_ms_err() generates a message that indicates some error during the compilation.

C_ms_opt() causes any optimization to be suppressed.

C_ms_emx() indicates the wordsize wsiz and pointersize psiz. This must be the first code generated, or the generated code is illegal.

C_ms_reg() can be used to indicate that a local variable, having offset offs and size (in bytes) siz, may be stored in a register. Class indicates the use of the variable. The following classes are allowed (the names are defined in em_reg.h):

    reg_any
        no specific type

    reg_loop
        loop control variable

    reg_pointer
        pointer variable

    reg_float
        floating point variable

Prior is taken to be the priority of the variable; higher numbers indicate better candidates.

C_ms_src() produces an indication of the number of source lines, nlines, in file filnam. This information can be used by a profiler.

C_ms_flt() produces an indication that floating-point operations are used.

C_ms_com() causes the string 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.

C_ms_par() produces an indication that no more than nbytes of parameters are accessed, either directly or indirectly.

C_ms_ego() produces a hint from the EM global optimizer. The parameters needed are conform to the format of the message.

C_ms_gto() can be invoked to indicate that a procedure uses a non-local goto.

The C_ms_stb and C_ms_std routines produce a message that a back-end can use for (debugger) symbol table entries.

FILES
~em/modules/h/em.h
~em/h/em_reg.h
~em/h/em_ego.h
~em/modules/lib/libem_mes.a

MODULES
em_code(3)

SEE ALSO
em_code(3), read_em(3)

DIAGNOSTICS
None of the functions return a value.

REMARKS
There is no C_ms_ext() routine, since this message uses a variable number of arguments.