Initial revision
This commit is contained in:
9
modules/src/em_mes/C_ms_com.c
Normal file
9
modules/src/em_mes/C_ms_com.c
Normal file
@@ -0,0 +1,9 @@
|
||||
#include <em.h>
|
||||
#include <em_mes.h>
|
||||
|
||||
C_ms_com(str)
|
||||
char *str;
|
||||
{
|
||||
C_mes_begin(ms_com);
|
||||
C_mes_end();
|
||||
}
|
||||
14
modules/src/em_mes/C_ms_ego.c
Normal file
14
modules/src/em_mes/C_ms_ego.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <em.h>
|
||||
#include <em_mes.h>
|
||||
|
||||
C_ms_ego(hint, offs, siz, regno)
|
||||
int hint, regno;
|
||||
arith offs, siz;
|
||||
{
|
||||
C_mes_begin(ms_ego);
|
||||
C_cst((arith)hint);
|
||||
C_cst(offs);
|
||||
C_cst(siz);
|
||||
C_cst((arith)regno);
|
||||
C_mes_end();
|
||||
}
|
||||
11
modules/src/em_mes/C_ms_emx.c
Normal file
11
modules/src/em_mes/C_ms_emx.c
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <em.h>
|
||||
#include <em_mes.h>
|
||||
|
||||
C_ms_emx(wsiz, psiz)
|
||||
arith wsiz, psiz;
|
||||
{
|
||||
C_mes_begin(ms_emx);
|
||||
C_cst(wsiz);
|
||||
C_cst(psiz);
|
||||
C_mes_end();
|
||||
}
|
||||
8
modules/src/em_mes/C_ms_err.c
Normal file
8
modules/src/em_mes/C_ms_err.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <em.h>
|
||||
#include <em_mes.h>
|
||||
|
||||
C_ms_err()
|
||||
{
|
||||
C_mes_begin(ms_err);
|
||||
C_mes_end();
|
||||
}
|
||||
8
modules/src/em_mes/C_ms_flt.c
Normal file
8
modules/src/em_mes/C_ms_flt.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <em.h>
|
||||
#include <em_mes.h>
|
||||
|
||||
C_ms_flt()
|
||||
{
|
||||
C_mes_begin(ms_flt);
|
||||
C_mes_end();
|
||||
}
|
||||
8
modules/src/em_mes/C_ms_gto.c
Normal file
8
modules/src/em_mes/C_ms_gto.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <em.h>
|
||||
#include <em_mes.h>
|
||||
|
||||
C_ms_gto()
|
||||
{
|
||||
C_mes_begin(ms_gto);
|
||||
C_mes_end();
|
||||
}
|
||||
8
modules/src/em_mes/C_ms_opt.c
Normal file
8
modules/src/em_mes/C_ms_opt.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <em.h>
|
||||
#include <em_mes.h>
|
||||
|
||||
C_ms_opt()
|
||||
{
|
||||
C_mes_begin(ms_opt);
|
||||
C_mes_end();
|
||||
}
|
||||
10
modules/src/em_mes/C_ms_par.c
Normal file
10
modules/src/em_mes/C_ms_par.c
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <em.h>
|
||||
#include <em_mes.h>
|
||||
|
||||
C_ms_par(nparams)
|
||||
arith nparams;
|
||||
{
|
||||
C_mes_begin(ms_par);
|
||||
C_cst(nparams);
|
||||
C_mes_end();
|
||||
}
|
||||
14
modules/src/em_mes/C_ms_reg.c
Normal file
14
modules/src/em_mes/C_ms_reg.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <em.h>
|
||||
#include <em_mes.h>
|
||||
|
||||
C_ms_reg(offs, siz, class, prior)
|
||||
arith offs, siz;
|
||||
int class, prior;
|
||||
{
|
||||
C_mes_begin(ms_reg);
|
||||
C_cst(offs);
|
||||
C_cst(siz);
|
||||
C_cst((arith)class);
|
||||
C_cst((arith)prior);
|
||||
C_mes_end();
|
||||
}
|
||||
12
modules/src/em_mes/C_ms_src.c
Normal file
12
modules/src/em_mes/C_ms_src.c
Normal file
@@ -0,0 +1,12 @@
|
||||
#include <em.h>
|
||||
#include <em_mes.h>
|
||||
|
||||
C_ms_src(nlines, filnam)
|
||||
int nlines;
|
||||
char *filnam;
|
||||
{
|
||||
C_mes_begin(ms_src);
|
||||
C_cst((arith)nlines);
|
||||
C_scon(filnam, strlen(filnam) + 1);
|
||||
C_mes_end();
|
||||
}
|
||||
146
modules/src/em_mes/em_mes.3
Normal file
146
modules/src/em_mes/em_mes.3
Normal file
@@ -0,0 +1,146 @@
|
||||
.TH EM_MES 3ACK "86/03/18"
|
||||
.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()
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
This set of routines forms a front end for the
|
||||
.IR em_code (3L)
|
||||
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.
|
||||
.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.
|
||||
.PP
|
||||
Please report other bugs to the author.
|
||||
.SH AUTHOR
|
||||
Erik Baalbergen <erikb@vu44.UUCP>
|
||||
Reference in New Issue
Block a user