2002-02-13 11:17:26 +03:00
|
|
|
.\" $NetBSD: genassym.cf.5,v 1.9 2002/02/13 08:18:12 ross Exp $
|
1997-01-30 12:37:20 +03:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 1997 Matthias Pfaller.
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgement:
|
|
|
|
.\" This product includes software developed by Matthias Pfaller.
|
|
|
|
.\" 4. The name of the author may not be used to endorse or promote products
|
|
|
|
.\" derived from this software without specific prior written permission
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
1998-04-25 23:53:17 +04:00
|
|
|
.Dd April 25, 1998
|
1997-01-30 12:37:20 +03:00
|
|
|
.Dt GENASSYM.CF 5
|
1999-03-17 23:19:44 +03:00
|
|
|
.Os
|
1997-01-30 12:37:20 +03:00
|
|
|
.Sh NAME
|
|
|
|
.Nm genassym.cf
|
2001-06-05 16:39:40 +04:00
|
|
|
.Nd assym.h definition file
|
1997-01-30 12:37:20 +03:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
2001-06-05 16:39:40 +04:00
|
|
|
file is used by
|
1997-12-03 09:44:23 +03:00
|
|
|
.Xr genassym.sh 8
|
1997-01-30 12:37:20 +03:00
|
|
|
to make constant C expressions known to assembler source files.
|
|
|
|
Lines starting with '#' are discarded by
|
1997-12-03 09:44:23 +03:00
|
|
|
.Xr genassym.sh 8 .
|
2001-06-05 16:39:40 +04:00
|
|
|
Lines starting with
|
|
|
|
.Em include ,
|
1997-01-30 12:37:20 +03:00
|
|
|
.Em ifdef ,
|
|
|
|
.Em if ,
|
|
|
|
.Em else
|
|
|
|
or
|
|
|
|
.Em endif
|
1997-12-03 09:44:23 +03:00
|
|
|
are preceded with '#' and passed otherwise unmodified to the C compiler.
|
1997-01-30 12:37:20 +03:00
|
|
|
Lines starting with
|
|
|
|
.Em quote
|
|
|
|
get passed on with the
|
|
|
|
.Em quote
|
1998-04-25 23:53:17 +04:00
|
|
|
command removed.
|
|
|
|
The first word after a
|
1997-01-30 12:37:20 +03:00
|
|
|
.Em define
|
1998-04-25 23:53:17 +04:00
|
|
|
command is taken as a CPP identifier and the rest of the line has to be
|
|
|
|
a constant C expression. The output of
|
1997-12-03 09:44:23 +03:00
|
|
|
.Xr genassym.sh 8
|
1997-01-30 12:37:20 +03:00
|
|
|
will assign the numerical value of this expression to the CPP identifier.
|
1998-04-25 23:53:17 +04:00
|
|
|
.Em "export X"
|
|
|
|
is a shorthand for
|
|
|
|
.Em "define X X" .
|
|
|
|
.Em "struct X"
|
|
|
|
remembers X for the
|
|
|
|
.Em member
|
|
|
|
command and does a
|
|
|
|
.Em "define X_SIZEOF sizeof(X)" .
|
|
|
|
.Em "member X"
|
|
|
|
does a
|
2002-02-13 11:17:26 +03:00
|
|
|
.Em "define X offsetof(\*[Lt]last struct\*[Gt], X)" .
|
|
|
|
.Em "config \*[Lt]ctype\*[Gt] \*[Lt]gcc constraint\*[Gt] \*[Lt]asm print modifier\*[Gt]"
|
1998-04-25 23:53:17 +04:00
|
|
|
can be used to customize the output of
|
|
|
|
.Xr genassym.sh 8 .
|
2002-02-13 11:17:26 +03:00
|
|
|
When producing C output, values are casted to \*[Lt]ctype\*[Gt] (default: long)
|
|
|
|
before they get handed to printf. \*[Lt]gcc constraint\*[Gt] (default: n) is the
|
|
|
|
constraint used in the __asm__ statements. \*[Lt]asm print modifier\*[Gt] (default:
|
1998-04-25 23:53:17 +04:00
|
|
|
empty) can be used to force gcc to output operands in different ways
|
|
|
|
then normal. The "a" modifier e.g. stops gcc from emitting immediate
|
|
|
|
prefixes in front of constants for the i386 and m68k port.
|
1997-01-30 12:37:20 +03:00
|
|
|
.Sh FILES
|
|
|
|
.Pa /sys/arch/${MACHINE}/${MACHINE}/genassym.cf
|
|
|
|
.Sh SEE ALSO
|
2000-07-05 19:45:28 +04:00
|
|
|
.Xr genassym.sh 8
|
1997-01-30 12:37:20 +03:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
file appeared in
|
1997-11-24 09:28:50 +03:00
|
|
|
.Nx 1.3 .
|