home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 7
/
FreshFishVol7.bin
/
bbs
/
gnu
/
gcc-2.3.3-src.lha
/
GNU
/
src
/
amiga
/
gcc-2.3.3
/
gcc.info-10
(
.txt
)
< prev
next >
Wrap
GNU Info File
|
1994-02-06
|
50KB
|
857 lines
This is Info file gcc.info, produced by Makeinfo-1.49 from the input
file gcc.texi.
This file documents the use and the internals of the GNU compiler.
Copyright (C) 1988, 1989, 1992 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.
Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided also
that the sections entitled "GNU General Public License" and "Protect
Your Freedom--Fight `Look And Feel'" are included exactly as in the
original, and provided that the entire resulting derived work is
distributed under the terms of a permission notice identical to this
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that the sections entitled "GNU General Public
License" and "Protect Your Freedom--Fight `Look And Feel'", and this
permission notice, may be included in translations approved by the Free
Software Foundation instead of in the original English.
File: gcc.info, Node: Conversions, Next: RTL Declarations, Prev: Bit Fields, Up: RTL
Conversions
===========
All conversions between machine modes must be represented by
explicit conversion operations. For example, an expression which is
the sum of a byte and a full word cannot be written as `(plus:SI
(reg:QI 34) (reg:SI 80))' because the `plus' operation requires two
operands of the same machine mode. Therefore, the byte-sized operand is
enclosed in a conversion operation, as in
(plus:SI (sign_extend:SI (reg:QI 34)) (reg:SI 80))
The conversion operation is not a mere placeholder, because there
may be more than one way of converting from a given starting mode to
the desired final mode. The conversion operation code says how to do
For all conversion operations, X must not be `VOIDmode' because the
mode in which to do the conversion would not be known. The conversion
must either be done at compile-time or X must be placed into a register.
`(sign_extend:M X)'
Represents the result of sign-extending the value X to machine
mode M. M must be a fixed-point mode and X a fixed-point value of
a mode narrower than M.
`(zero_extend:M X)'
Represents the result of zero-extending the value X to machine
mode M. M must be a fixed-point mode and X a fixed-point value of
a mode narrower than M.
`(float_extend:M X)'
Represents the result of extending the value X to machine mode M.
M must be a floating point mode and X a floating point value of a
mode narrower than M.
`(truncate:M X)'
Represents the result of truncating the value X to machine mode M.
M must be a fixed-point mode and X a fixed-point value of a mode
wider than M.
`(float_truncate:M X)'
Represents the result of truncating the value X to machine mode M.
M must be a floating point mode and X a floating point value of a
mode wider than M.
`(float:M X)'
Represents the result of converting fixed point value X, regarded
as signed, to floating point mode M.
`(unsigned_float:M X)'
Represents the result of converting fixed point value X, regarded
as unsigned, to floating point mode M.
`(fix:M X)'
When M is a fixed point mode, represents the result of converting
floating point value X to mode M, regarded as signed. How
rounding is done is not specified, so this operation may be used
validly in compiling C code only for integer-valued operands.
`(unsigned_fix:M X)'
Represents the result of converting floating point value X to
fixed point mode M, regarded as unsigned. How rounding is done is
not specified.
`(fix:M X)'
When M is a floating point mode, represents the result of
converting floating point value X (valid for mode M) to an
integer, still represented in floating point mode M, by rounding
towards zero.
File: gcc.info, Node: RTL Declarations, Next: Side Effects, Prev: Conversions, Up: RTL
Declarations
============
Declaration expression codes do not represent arithmetic operations
but rather state assertions about their operands.
`(strict_low_part (subreg:M (reg:N R) 0))'
This expression code is used in only one context: as the
destination operand of a `set' expression. In addition, the
operand of this expression must be a non-paradoxical `subreg'
expression.
The presence of `strict_low_part' says that the part of the
register which is meaningful in mode N, but is not part of mode M,
is not to be altered. Normally, an assignment to such a subreg is
allowed to have undefined effects on the rest of the register when
M is less than a word.
File: gcc.info, Node: Side Effects, Next: Incdec, Prev: RTL Declarations, Up: RTL
Side Effect Expressions
=======================
The expression codes described so far represent values, not actions.
But machine instructions never produce values; they are meaningful only
for their side effects on the state of the machine. Special expression
codes are used to represent side effects.
The body of an instruction is always one of these side effect codes;
the codes described above, which represent values, appear only as the
operands of these.
`(set LVAL X)'
Represents the action of storing the value of X into the place
represented by LVAL. LVAL must be an expression representing a
place that can be stored in: `reg' (or `subreg' or
`strict_low_part'), `mem', `pc' or `cc0'.
If LVAL is a `reg', `subreg' or `mem', it has a machine mode; then
X must be valid for that mode.
If LVAL is a `reg' whose machine mode is less than the full width
of the register, then it means that the part of the register
specified by the machine mode is given the specified value and the
rest of the register receives an undefined value. Likewise, if
LVAL is a `subreg' whose machine mode is narrower than the mode of
the register, the rest of the register can be changed in an
undefined way.
If LVAL is a `strict_low_part' of a `subreg', then the part of the
register specified by the machine mode of the `subreg' is given
the value X and the rest of the register is not changed.
If LVAL is `(cc0)', it has no machine mode, and X may be either a
`compare' expression or a value that may have any mode. The latter
case represents a "test" instruction. The expression `(set (cc0)
(reg:M N))' is equivalent to `(set (cc0) (compare (reg:M N)
(const_int 0)))'. Use the former expression to save space during
the compilation.
If LVAL is `(pc)', we have a jump instruction, and the
possibilities for X are very limited. It may be a `label_ref'
expression (unconditional jump). It may be an `if_then_else'
(conditional jump), in which case either the second or the third
operand must be `(pc)' (for the case which does not jump) and the
other of the two must be a `label_ref' (for the case which does
jump). X may also be a `mem' or `(plus:SI (pc) Y)', where Y may
be a `reg' or a `mem'; these unusual patterns are used to
represent jumps through branch tables.
If LVAL is neither `(cc0)' nor `(pc)', the mode of LVAL must not
be `VOIDmode' and the mode of X must be valid for the mode of LVAL.
LVAL is customarily accessed with the `SET_DEST' macro and X with
the `SET_SRC' macro.
`(return)'
As the sole expression in a pattern, represents a return from the
current function, on machines where this can be done with one
instruction, such as Vaxes. On machines where a multi-instruction
"epilogue" must be executed in order to return from the function,
returning is done by jumping to a label which precedes the
epilogue, and the `return' expression code is never used.
Inside an `if_then_else' expression, represents the value to be
placed in `pc' to return to the caller.
Note that an insn pattern of `(return)' is lo