added manual pages for library and stand alone program
This commit is contained in:
109
modules/src/em_opt/em_opt.3
Normal file
109
modules/src/em_opt/em_opt.3
Normal file
@@ -0,0 +1,109 @@
|
||||
.TH EM_OPT 3ACK "$Revision$"
|
||||
.ad
|
||||
.SH NAME
|
||||
emopt \- EM code peephole optimizer interface for compilers
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #define PEEPHOLE
|
||||
.B #include <em.h>
|
||||
.PP
|
||||
.B O_init(wsize, psize)
|
||||
.B arith wsize, psize;
|
||||
.PP
|
||||
.B int O_open(filename)
|
||||
.B O_close()
|
||||
.B int O_busy()
|
||||
.B char *filename;
|
||||
.PP
|
||||
.B O_magic()
|
||||
.PP
|
||||
.B O_df_dlb(l)
|
||||
.B O_df_dnam(s)
|
||||
.B O_df_ilb(l)
|
||||
.B label l; char *s;
|
||||
.PP
|
||||
.B O_pro(s, l)
|
||||
.B O_pro_narg(s)
|
||||
.B O_end(l)
|
||||
.B O_end_narg()
|
||||
.B char *s; arith l;
|
||||
.PP
|
||||
.B O_exa_dlb(l)
|
||||
.B O_exa_dnam(s)
|
||||
.B O_exp(s)
|
||||
.B O_ina_dlb(l)
|
||||
.B O_ina_dnam(s)
|
||||
.B O_inp(s)
|
||||
.B char *s; label l;
|
||||
.PP
|
||||
.BI O_bss_ cstp ()
|
||||
.BI O_hol_ cstp ()
|
||||
.BI O_con_ cstp ()
|
||||
.BI O_rom_ cstp ()
|
||||
.PP
|
||||
.B #include <em_mes.h>
|
||||
.B O_mes_begin(ms)
|
||||
.BI O_ cstp ()
|
||||
.B O_mes_end()
|
||||
.B int ms;
|
||||
.PP
|
||||
.B O_exc(c1, c2)
|
||||
.B arith c1, c2;
|
||||
.PP
|
||||
.BI O_ mnem ()
|
||||
.BI O_ mnem _dlb()
|
||||
.BI O_ mnem _dnam()
|
||||
.BI O_ mnem _narg()
|
||||
.PP
|
||||
.B O_insertpart(id)
|
||||
.B int id;
|
||||
.PP
|
||||
.B O_beginpart(id)
|
||||
.B int id;
|
||||
.PP
|
||||
.B O_endpart(id)
|
||||
.B int id;
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
This package provides a procedural EM code peephole optimizer interface to be
|
||||
used in compilers and other EM code producing programs. The interface
|
||||
routines are identical to the EM_CODE(3) procedure interface except that all
|
||||
names have been replaced by
|
||||
.I O_xxx
|
||||
. It is possible to convert
|
||||
a program that is currently using the EM_CODE interface by defining PEEPHOLE
|
||||
before including em.h which enables a series of macros to map all the
|
||||
.I C_xxx
|
||||
names to the corresponding
|
||||
.I O_xxx
|
||||
names. The module in turn calls
|
||||
.I C_xxx
|
||||
routines to output the optimized code. Hence it is possible to add peephole
|
||||
optimization to any program that outputs EM code usng the EM_CODE module.
|
||||
.PP
|
||||
Details of the
|
||||
.I O_xxx
|
||||
routines may be obtained by refering to the description
|
||||
of the corresponding
|
||||
.I C_xxx
|
||||
routine in EM_CODE(3).
|
||||
.SH FILES
|
||||
.nf
|
||||
~em/modules/h/em.h
|
||||
~em/modules/lib/libemopt.a
|
||||
.fi
|
||||
.SH MODULES
|
||||
.nf
|
||||
alloc(3), system(3), string(3)
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
em_nopt(1) em_code(3), read_em(3), em_mes(3)
|
||||
.SH DIAGNOSTICS
|
||||
.I O_open
|
||||
returns 1 if the open is successful and 0 if not.
|
||||
.SH BUGS
|
||||
It is not possible to indicate that the argument of
|
||||
.B O_con_cst ()
|
||||
must be seen as an unsigned value.
|
||||
.SH AUTHOR
|
||||
Bruce McKenzie <bruce@cantuar.UUCP>
|
||||
Reference in New Issue
Block a user