summaryrefslogtreecommitdiff
path: root/usr.bin/pcc/ccom/ccom.1
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2007-10-07 17:58:53 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2007-10-07 17:58:53 +0000
commit14b353bdf99a61b29314822d06fff3f7250019ac (patch)
treecfb9b82ab66c64756933986a1d66b0b133819ab4 /usr.bin/pcc/ccom/ccom.1
parent71267fa7f73e6e874cf9cb489551cb44ead37aba (diff)
reorg pcc tree; requested by and ok deraadt@; ok ragge@
Diffstat (limited to 'usr.bin/pcc/ccom/ccom.1')
-rw-r--r--usr.bin/pcc/ccom/ccom.1167
1 files changed, 167 insertions, 0 deletions
diff --git a/usr.bin/pcc/ccom/ccom.1 b/usr.bin/pcc/ccom/ccom.1
new file mode 100644
index 00000000000..2ad56676fab
--- /dev/null
+++ b/usr.bin/pcc/ccom/ccom.1
@@ -0,0 +1,167 @@
+.\" $Id: ccom.1,v 1.1 2007/10/07 17:58:51 otto Exp $
+.\" $NetBSD$
+.\" $OpenBSD: ccom.1,v 1.1 2007/10/07 17:58:51 otto Exp $
+."\
+.\" Copyright (c) 2007 Jeremy C. Reed <reed@reedmedia.net>
+.\" Permission to use, copy, modify, and/or distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR AND CONTRIBUTORS DISCLAIM
+.\" ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL AUTHOR AND
+.\" CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+.\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+.\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+.\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+.\" THIS SOFTWARE.
+.Dd September 14, 2007
+.Dt ccom 1
+.Os
+.Sh NAME
+.Nm ccom
+.Nd C compiler
+.Sh SYNOPSIS
+.Nm
+.Op Fl gs
+.Op Fl W Ar flags
+.Op Fl X Ar flags
+.Op Fl x Ar optimizations
+.Op Fl Z Ar flags
+.Op infile
+.Op outfile
+.Pp
+.Sh DESCRIPTION
+The
+.Nm
+utility provides a C compiler.
+The frontend is usually
+.Xr pcc 1 .
+It is \fBnot\fR intended to be run directly.
+.Pp
+.Nm
+reads the C source from
+.Ar infile
+or standard input and writes the assembler source
+to
+.Ar outfile
+or to standard output.
+.Pp
+The options are as follows:
+.Bl -tag -width Ds
+.It Fl g
+Enable debugging.
+.\" built into binary, explain stabs?
+.It Fl s
+Print statistics to standard error when complete.
+This includes:
+name table entries, name string size, permanent allocated memory,
+temporary allocated memory, lost memory, argument list unions,
+dimension/function unions, struct/union/enum blocks, inline node count,
+inline control blocks, and permanent symtab entries.
+.\" TODO: explain units for above?
+.It Fl v
+Display version.
+.It Fl W Ar flags
+Report warnings.
+(Do some basic checks.)
+NOTE! These are subject to change RSN!
+.Ar flags
+is one or more of the following:
+.Bl -tag -width Ds
+.It Sy implicit
+Implies
+.Sy implicit-function-declaration
+and
+.Sy implicit-int .
+.It Sy implicit-function-declaration
+Report if no prototype for function.
+.It Sy implicit-int
+TODO
+.It Sy missing-prototypes
+TODO
+.It Sy strict-prototypes
+TODO
+.El
+.\"
+.It Fl X Ar flags
+C specific debugging where
+.Ar flags
+is one or more of the following:
+.Bl -tag -width Ds
+.It Sy b
+Building of parse trees
+.It Sy d
+Declarations (multiple
+.Sy d
+flags gives more output)
+.It Sy e
+Pass1 trees at exit
+.It Sy i
+Initializations
+.It Sy t
+Type conversions
+.It Sy x
+Target-specific flag, used in machine-dependent code
+.El
+.\"
+.It Fl x Ar optimizations
+.Ar optimizations
+is one or more of the following:
+.\" TODO: reword this, since multiple terms don't go with one -x switch??
+.Bl -tag -width deljumps
+.It Sy deljumps
+Delete redundant jumps and dead code.
+.It Sy ssa
+Convert statements into SSA form for optimization. Not yet finished.
+.It Sy tailcall
+Currently not implemented.
+.It Sy temps
+Setting this flag allows variables to be put into registers, for further
+optimization by the register allocator.
+.El
+.\"
+.It Fl Z Ar flags
+Code generator (pass2) specific debugging where
+.Ar flags
+is one or more of the following:
+.Bl -tag -width Ds
+.It Sy e
+Trees when entering pass2
+.It Sy f
+Instruction matcher, may provide much output
+.It Sy o
+Instruction generator
+.It Sy r
+Register allocator
+.It Sy s
+Shape matching in instruction generator
+.It Sy t
+Type matching in instruction generator
+.It Sy u
+Sethi-Ullman computations
+.It Sy x
+Target-specific flag, used in machine-dependent code
+.El
+.El
+.Sh SEE ALSO
+.Xr as 1 ,
+.Xr cpp 1 ,
+.Xr pcc 1
+.Sh HISTORY
+The
+.Nm
+compiler is based on the original Portable C Compiler by S. C.
+Johnson, written in the late 70's.
+Even though much of the compiler has been rewritten, some of the
+basics still remain.
+About 50% of the frontend code and 80% of the backend code has been
+rewritten.
+Most is written by Anders Magnusson, with the exception of
+the data-flow analysis part and the SSA conversion code which is
+written by Peter A Jonsson, and the Mips port that were written as
+part of a project by undergraduate students at Lulea University of
+Technology.
+.Pp
+This product includes software developed or owned by Caldera
+International, Inc.