--- gcc/gcc.texinfo 2018/04/24 16:51:45 1.1.1.7 +++ gcc/gcc.texinfo 2018/04/24 16:52:39 1.1.1.8 @@ -39,9 +39,9 @@ Free Software Foundation instead of in t @sp 2 @center Richard M. Stallman @sp 3 -@center last updated 22 April 1989 +@center last updated 12 September 1989 @sp 1 -@center for version 1.35 +@center for version 1.36 @page @vskip 0pt plus 1filll Copyright @copyright{} 1988, 1989 Free Software Foundation, Inc. @@ -88,6 +88,7 @@ well as its new features and incompatibi * RTL:: The intermediate representation that most passes work on. * Machine Desc:: How to write machine description instruction patterns. * Machine Macros:: How to write the machine description C macros. +* Config:: Writing the @file{xm-@var{machine}.h} file. @end menu @node Copying, Contributors, Top, Top @@ -418,7 +419,7 @@ loop optimizations. @item Nobuyuki Hikichi of Software Research Associates, Tokyo, contributed -the support for the SONY NEWS machine. +the support for the Sony NEWS machine. @item Charles LaBrec contributed the support for the Integrated Solutions @@ -460,7 +461,14 @@ Christopher Smith did the port for Conve Paul Petersen wrote the machine description for the Alliant FX/8. @item -Alain Lichnewsky ported GNU CC to the MIPS cpu. +Alain Lichnewsky ported GNU CC to the Mips cpu. + +@item +Devon Bowen, Dale Wiles and Kevin Zachmann ported GNU CC to the Tahoe. + +@item +Jonathan Stone wrote the machine description for the Pyramid computer. +Note that this machine description does not fully work. @end itemize @node Options, Installation, Contributors, Top @@ -469,7 +477,7 @@ Alain Lichnewsky ported GNU CC to the MI The GNU C compiler uses a command syntax much like the Unix C compiler. The @code{gcc} program accepts options and file names as operands. Multiple single-letter options may @emph{not} be grouped: @samp{-dr} is -very different from @samp{-d -r}. +very different from @w{@samp{-d -r}}. When you invoke GNU CC, it normally does preprocessing, compilation, assembly and linking. File names which end in @samp{.c} are taken as C @@ -553,6 +561,27 @@ You can get a similar result from the en in the same way. If both the @samp{-B} option and the @code{GCC_EXEC_PREFIX} variable are present, the @samp{-B} option is used first and the environment variable value second. + +@item -b@var{prefix} +The argument @var{prefix} is used as a second prefix for the compiler +executables and libraries. This prefix is optional: the compiler tries +each file first with it, then without it. This prefix follows the +prefix specified with @samp{-B} or the default prefixes. + +Thus, @samp{-bvax- -Bcc/} in the presence of environment variable +@code{GCC_EXEC_PREFIX} with definition @file{/u/foo/} causes GNU CC to +try the following file names for the preprocessor executable: + +@example +cc/vax-cpp +cc/cpp +/u/foo/vax-cpp +/u/foo/cpp +/usr/local/lib/gcc-vax-cpp +/usr/local/lib/gcc-cpp +/usr/lib/gcc-vax-cpp +/usr/lib/gcc-cpp +@end example @end table These options control the details of C compilation itself. @@ -567,12 +596,12 @@ keywords, and predefined macros such as that identify the type of system you are using. It also enables the undesirable and rarely used ANSI trigraph feature. -The alternate keywords @code{__asm}, @code{__inline} and -@code{__typeof} continue to work despite @samp{-ansi}. You would not +The alternate keywords @code{__asm__}, @code{__inline__} and +@code{__typeof__} continue to work despite @samp{-ansi}. You would not want to use them in an ANSI C program, of course, but it useful to put them in header files that might be included in compilations done with -@samp{-ansi}. Alternate predefined macros such as @code{__unix} and -@code{__vax} are also available, with or without @samp{-ansi}. +@samp{-ansi}. Alternate predefined macros such as @code{__unix__} and +@code{__vax__} are also available, with or without @samp{-ansi}. The @samp{-ansi} option does not cause non-ANSI programs to be rejected gratuitously. For that, @samp{-pedantic} is required in @@ -609,6 +638,11 @@ to @code{unsigned int}. Out-of-range floating point literals are not an error. @item +String ``constants'' are not necessarily constant; they are stored in +writable space, and identical looking constants are allocated +separately. + +@item All automatic variables not declared @code{register} are preserved by @code{longjmp}. Ordinarily, GNU C follows ANSI C: automatic variables not declared @code{volatile} may be clobbered. @@ -671,15 +705,7 @@ Nevertheless it proves possible to debug it reasonable to use the optimizer for programs that might have bugs. @item -gg -Produce debugging information in GDB's own format. This requires the -GNU assembler and linker in order to work. - -This feature will probably be eliminated. It was intended to enable -GDB to read the symbol table faster, but it doesn't result in enough -of a speedup to be worth the larger object files and executables. We -are working on other ways of making GDB start even faster, which work -with DBX format debugging information and could be made to work with -SDB format. +Produce debugging information in the old GDB format. This is obsolete. @item -w Inhibit all warning messages. @@ -794,15 +820,8 @@ return-value in a function whose return- @item -Wunused Warn whenever a local variable is unused aside from its declaration, -and whenever a function is declared static but never defined. - -@item -Wshadow -Warn whenever a local variable shadows another local variable. - -@item -Wid-clash-@var{len} -Warn whenever two distinct identifiers match in the first @var{len} -characters. This may help you prepare a program that will compile -with certain obsolete, brain-damaged compilers. +whenever a function is declared static but never defined, and whenever +a statement computes a result that is explicitly not used. @item -Wswitch Warn whenever a @code{switch} statement has an index of enumeral type @@ -818,7 +837,27 @@ Warn whenever a comment-start sequence @ Warn if any trigraphs are encountered (assuming they are enabled). @item -Wall -All of the above @samp{-W} options combined. +All of the above @samp{-W} options combined. These are all the +options which pertain to usage that we recommend avoiding and that we +believe is easy to avoid, even in conjunction with macros. + +The other @samp{-W@dots{}} options below are not implied by @samp{-Wall} +because certain kinds of useful macros are almost impossible to write +without causing those warnings. + +@item -Wshadow +Warn whenever a local variable shadows another local variable. + +@item -Wid-clash-@var{len} +Warn whenever two distinct identifiers match in the first @var{len} +characters. This may help you prepare a program that will compile +with certain obsolete, brain-damaged compilers. + +@item -Wpointer-arith +Warn about anything that depends on the ``size of'' a function type or +of @code{void}. GNU C assigns these types a size of 1, for +convenience in calculations with @code{void *} pointers and pointers +to functions. @item -Wcast-qual Warn whenever a pointer is cast so as to remove a type qualifier from @@ -843,8 +882,10 @@ Generate extra code to write profile inf analysis program @code{gprof}. @item -a -Generate extra code to write profile information for basic blocks, -suitable for the analysis program @code{tcov}. Eventually GNU +Generate extra code to write profile information for basic blocks, which +will record the number of times each basic block is executed. This data +could be analyzed by a program like @code{tcov}. Note, however, that +the format of the data is not what @code{tcov} expects. Eventually GNU @code{gprof} should be extended to process this data. @item -l@var{library} @@ -1021,7 +1062,7 @@ Use @samp{-ffloat-store} for such progra @item -fno-asm Do not recognize @code{asm}, @code{inline} or @code{typeof} as a keyword. These words may then be used as identifiers. You can -use @code{__asm}, @code{__inline} and @code{__typeof} instead. +use @code{__asm__}, @code{__inline__} and @code{__typeof__} instead. @item -fno-defer-pop Always pop the arguments to each function call as soon as that @@ -1090,10 +1131,12 @@ function is declared @code{static}, neve separate run-time callable version of the function. @item -fwritable-strings -Store string constants in the writable data segment and don't -uniquize them. This is for compatibility with old programs which -assume they can write into string constants. Writing into string -constants is a very bad idea; ``constants'' should be constant. +Store string constants in the writable data segment and don't uniquize +them. This is for compatibility with old programs which assume they can +write into string constants. @samp{-traditional} also has this effect. + +Writing into string constants is a very bad idea; ``constants'' should +be constant. @item -fcond-mismatch Allow conditional expressions with mismatched types in the second and @@ -1139,6 +1182,11 @@ Let the type @code{char} be signed, like Note that this is equivalent to @samp{-fno-unsigned-char}, which is the negative form of @samp{-funsigned-char}. +@item -fdelayed-branch +If supported for the target machine, attempt to reorder instructions +to exploit instruction slots available after delayed branch +instructions. + @item -ffixed-@var{reg} Treat the register named @var{reg} as a fixed register; generated code should never refer to it (except perhaps as a stack pointer, @@ -1192,8 +1240,6 @@ Here are the possible letters: Dump after RTL generation. @item j Dump after first jump optimization. -@item J -Dump after last jump optimization. @item s Dump after CSE (including the jump optimization that sometimes follows CSE). @@ -1207,6 +1253,10 @@ Dump after instruction combination. Dump after local register allocation. @item g Dump after global register allocation. +@item d +Dump after delayed branch scheduling. +@item J +Dump after last jump optimization. @item m Print statistics on memory usage, at the end of the run. @end table @@ -1221,6 +1271,10 @@ without this option, certain GNU extensi are supported as well. With this option, they are rejected. There is no reason to @i{use} this option; it exists only to satisfy pedants. +@samp{-pedantic} does not cause warning messages for use of the +alternate keywords whose names begin and end with @samp{__}. +@xref{Alternate Keywords}. + @item -static On Suns running version 4, this prevents linking with the shared libraries. (@samp{-g} has the same effect.) @@ -1251,12 +1305,23 @@ directives. (Ordinarily @emph{all} @sam this way.) In addition, the @samp{-I-} option inhibits the use of the current -directory as the first search directory for @samp{#include -"@var{file}"}. Therefore, the current directory is searched only if -it is requested explicitly with @samp{-I.}. Specifying both -@samp{-I-} and @samp{-I.} allows you to control precisely which -directories are searched before the current one and which are searched -after. +directory (where the current input file came from) as the first search +directory for @samp{#include "@var{file}"}. There is no way to override +this effect of @samp{-I-}. With @samp{-I.} you can specify searching +the directory which was current when the compiler was invoked. That is +not exactly the same as what the preprocessor does by default, but it is +often satisfactory. + +@samp{-I-} does not inhibit the use of the standard system directories +for header files. Thus, @samp{-I-} and @samp{-nostdinc} are +independent. + +@item -i @var{file} +Process @var{file} as input, discarding the resulting output, before +processing the regular input file. Because the output generated from +@var{file} is discarded, the only effect of @samp{-i @var{file}} is to +make the macros defined in @var{file} available for use in the main +input. @item -nostdinc Do not search the standard system directories for header files. Only @@ -1284,7 +1349,7 @@ included with @samp{#include <@var{file} @samp{-MM} implies @samp{-E}. @item -D@var{macro} -Define macro @var{macro} with the empty string as its definition. +Define macro @var{macro} with the string @samp{1} as its definition. @item -D@var{macro}=@var{defn} Define macro @var{macro} as @var{defn}. @@ -1301,11 +1366,18 @@ brain-damage. The @samp{-ansi} option a @chapter Installing GNU CC Here is the procedure for installing GNU CC on a Unix system. + @menu +* Other Dir:: Compiling in a separate directory (not where the source is). +* Sun Install:: See below for installation on the Sun. +* 3B1 Install:: See below for installation on the 3B1. * VMS Install:: See below for installation on VMS. @end menu @iftex -(See below for VMS.) +See below for VMS systems, and modified procedures needed on Sun systems +and 3b1 machines. The following section says how to compile in a +separate directory on Unix; here we assume you compile in the same +directory that contains the source files. @end iftex @enumerate @@ -1319,8 +1391,8 @@ On a Sequent system, go to the Berkeley @item Choose configuration files. The easy way to do this is to run the -command file @file{config.gcc} with a single argument, which is the -name of the machine (and operating system, in some cases). +command file @file{config.gcc} with a single argument, which specifies +the type of machine (and in some cases which operating system). Here is a list of the possible arguments: @@ -1338,18 +1410,20 @@ Intel 386 PCs running system V, using th linker. @item sequent-i386 Sequent with Intel 386 processors. +@item i386-aix +Intel 386 PCs or PS/2s running AIX. @item sun2 Sun 2 running system version 2 or 3. @item sun3 Sun 3 running system version 2 or 3, with 68881. - Note there we do not provide a configuration file to use an FPA -by default because programs that establish signal handlers for +by default, because programs that establish signal handlers for floating point traps inherently cannot work with the FPA. @item sun3-nfp Sun 3 running system version 2 or 3, without 68881. @item sun4 -Sun 4 running system version 2 or 3. +Sun 4 running system version 2 or 3. @xref{Incompatibilities}, +for calling convention incompatibilities on the Sun 4 (sparc). @item sun2-os4 Sun 2 running system version 4. @item sun3-os4 @@ -1357,32 +1431,75 @@ Sun 3 running system version 4, with 688 @item sun3-nfp-os4 Sun 3 running system version 4, without 68881. @item sun4-os4 -Sun 4 running system version 4. +Sun 4 running system version 4. @xref{Incompatibilities}, +for calling convention incompatibilities on the Sun 4 (sparc). @item sun386 Sun 386 (``roadrunner''). @item alliant -Alliant FX/8 computer. Currently, there are bugs in the support -for floating point. Also note that Alliant's version of dbx does -not manage to work with the output from GNU CC. +Alliant FX/8 computer. Note that the standard installed C compiler in +Concentrix 5.0 has a bug which prevent it from compiling GNU CC +correctly. You can patch the compiler bug as follows: + +@example +cp /bin/pcc ./pcc +adb -w ./pcc - << 'EOF' +15f6?w 6610 +EOF +@end example + +Then you must use the @samp{-ip12} option when compiling GNU CC +with the patched compiler, as shown here: + +@example +make CC="./pcc -ip12" CFLAGS=-w +@end example + +Note also that Alliant's version of DBX does not manage to work with the +output from GNU CC. +@item tahoe +The tahoe computer (running BSD, and using DBX). +@item decstation +The DEC 3100 Mips machine (``pmax''). Note that GNU CC cannot generate +debugging information in the unusual format used on the Mips. +@item mips-sysv +The Mips computer, RS series, with the System V environment as default. +Note that GNU CC cannot generate debugging information in the unusual +format used on the Mips. +@item mips-bsd43 +The Mips computer, RS series, with the BSD 4.3 environment as default. +Note that GNU CC cannot generate debugging information in the unusual +format used on the Mips. @item mips -Some variant of MIPS computer (but not the one from DEC). Note -that this machine description was written for GNU CC version 1.32 -and may require some updating to work with the current version. +The Mips computer, M series. Note that GNU CC cannot generate debugging +information in the unusual format used on the Mips. +@item iris +The Mips computer, as delivered by Iris. Note that GNU CC cannot +generate debugging information in the unusual format used on the Mips. @item convex-c1 Convex C1 computer. @item convex-c2 Convex C2 computer. +@item pyramid +Pyramid computer. @item hp9k320 HP 9000 series 300 using HPUX assembler. Note there is no support in GNU CC for HP's debugger; thus, @samp{-g} is not available in this configuration. -@item hp9k320g +@item hp9k320-gas HP 9000 series 300 using GNU assembler, linker and debugger. This requires the HP-adapt package, which is available along with the GNU linker as part of the ``binutils'' distribution. This is on the GNU CC distribution tape. +@item hp9k320-old +HP 9000 series 300 using HPUX assembler, in operating system versions +older than 6.5. Note there is no support in GNU CC for HP's debugger; +thus, @samp{-g} is not available in this configuration. +@item hp9k320-bsd +HP 9000 series 300 running BSD. @item isi68 -ISI 68000 or 68020 system. +ISI 68000 or 68020 system with a 68881. +@item isi68-nfp +ISI 68000 or 68020 system without a 68881. @item news800 Sony NEWS 68020 system. @item next @@ -1392,11 +1509,10 @@ Altos 3068. Note that you must use the debugger, with COFF-encapsulation. Also, you must fix a kernel bug. Details in the file @file{ALTOS-README}. @item 3b1 -AT&T 3b1, a.k.a. 7300 PC. Note that the current version of GNU -CC cannot be compiled with the Unix compiler on this machine, due -to bugs in the Unix comiler. GNU CC does work correctly, -however, if you can compile it with older version of GNU CC or -cross-compile it. +AT&T 3b1, a.k.a. 7300 PC. Note that special procedures are needed +to compile GNU CC with this machine's standard C compiler, due to +bugs in that compiler. @xref{3b1 Install}. You can bootstrap it +more easily with previous versions of GNU CC if you have them. @item sequent-ns32k Sequent containing ns32000 processors. @item encore @@ -1426,9 +1542,6 @@ for vaxen running VMS. for vaxen running system V. @item xm-i386v.h for Intel 80386's running system V. -@item xm-sunos4.h -for Suns (model 2, 3 or 4) running @emph{operating system} version 4. -(Use @file{xm-m68k.h} or @file{xm-sparc.h} for version 3.) @item xm-sun386i.h for Sun roadrunner running any version of the operating system. @item xm-hp9k320.h @@ -1454,6 +1567,11 @@ directly. Instead, use one of these fil for Sun 3 machines with 68881. @item tm-sun3-nfp.h for Sun 3 machines with no hardware floating point. +@item tm-sun3os3.h +for Sun 3 machines with 68881, running Sunos version 3. +@item tm-sun3os3nf.h +for Sun 3 machines with no hardware floating point, running Sunos +version 3. @item tm-sun2.h for Sun 2 machines. @item tm-3b1.h @@ -1461,8 +1579,11 @@ for AT&T 3b1 (aka 7300 Unix PC). @item tm-isi68.h for Integrated Solutions systems. This file assumes you use the GNU assembler. +@item tm-isi68-nfp.h +for Integrated Solutions systems without a 68881. This file assumes you +use the GNU assembler. @item tm-news800.h -for SONY News systems. +for Sony NEWS systems. @item tm-hp9k320.h for HPUX systems, if you are using GNU CC with the system's assembler and linker. @@ -1488,6 +1609,12 @@ GNU assembler and linker, @file{tm-seq38 or @file{tm-compaq.h} for a Compaq, or @file{tm-sun386i.h} for a Sun 386 system. +For the Mips computer, there are five choices: @file{tm-mips.h} for the +M series, @file{tm-mips-bsd.h} for the RS series with BSD, +@file{tm-mips-sysv.h} for the RS series with System V, @file{tm-iris.h} +for the Iris version of the machine, and @file{tm-decstatn.h} for the +Decstation. + For the 32000, use @file{tm-sequent.h} if you are using a Sequent machine, or @file{tm-encore.h} for an Encore machine, or @file{tm-genix.h} if you are using Genix version 3; otherwise, perhaps @@ -1525,13 +1652,6 @@ Bison versions older that Sept 8, 1988 w for @file{c-parse.tab.c}. @item -If you are using a Sun, make sure the environment variable -@code{FLOAT_OPTION} is not set. If this option were set to -@code{f68881} when @file{gnulib} is compiled, the resulting code would -demand to be linked with a special startup file and will not link -properly without special pains. - -@item Build the compiler. Just type @samp{make} in the compiler directory. Ignore any warnings you may see about ``statement not reached'' in the @@ -1666,34 +1786,120 @@ specify @samp{-B/usr/foo/gcc/} when you Also, you can specify an alternative default directory for these files by setting the Make variable @code{libdir} when you make GNU CC. -@node VMS Install,, Installation, Installation -@section Installing GNU CC on VMS +@node Other Dir, Sun Install, Installation, Installation +@section Compilation in a Separate Directory -The VMS version of GNU CC is distributed in a backup saveset containing -both source code and precompiled binaries. +If you wish to build the object files and executables in a directory +other than the one containing the source files, here is what you must +do differently: + +@enumerate +@item +Go to that directory before running @file{config.gcc}: + +@example +mkdir gcc-sun3 +cd gcc-sun3 +@end example -Sometimes the binaries will be from an older version that the sources, -because we don't always have time to update them. In this case, you -should use the binaries you get to recompile the sources. If you must -recompile, here is how: +On systems that do not support symbolic links, this directory must be +on the same file system as the source code directory. + +@item +Specify where to find @file{config.gcc} when you run it: + +@example +../gcc-1.36/config.gcc @dots{} +@end example + +@item +Specify where to find the sources, as an argument to @file{config.gcc}: + +@example +../gcc-1.36/config.gcc -srcdir=../gcc-1.36 sun3 +@end example + +The @samp{-srcdir=@var{dir}} option is not needed when the source +directory is the parent of the current directory, because +@file{config.gcc} detects that case automatically. +@end enumerate + +Now, you can run @code{make} in that directory. You need not repeat the +configuration steps shown above, when ordinary source files change. You +must, however, run @code{config.gcc} again when the configuration files +change, if your system does not support symbolic links. + +@node Sun Install, 3b1 Install, Other Dir, Installation +@section Installing GNU CC on the Sun + +Make sure the environment variable @code{FLOAT_OPTION} is not set when +you compile @file{gnulib}. If this option were set to @code{f68881} +when @file{gnulib} is compiled, the resulting code would demand to be +linked with a special startup file and would not link properly without +special pains. + +There is a bug in @code{alloca} in certain versions of the Sun library. +To avoid this bug, install the binaries of GNU CC that were compiled by +GNU CC. They use @code{alloca} as a built-in function and never the one +in the library. + +Some versions of the Sun compiler crash when compiling GNU CC. +The problem is a segmentation fault in cpp. + +This problem seems to be due to the bulk of data in the environment +variables. You may be able to avoid it by using the following +command to compile GNU CC with Sun CC: + +@example +make CC="TERMCAP=x OBJS=x LIBFUNCS=x STAGESTUFF=x cc" +@end example + +@node 3b1 Install, VMS Install, Sun Install, Installation +@section Installing GNU CC on the 3b1 + +Installing GNU CC on the 3b1 is difficult if you do not already have +GNU CC running, due to bugs in the installed C compiler. However, +the following procedure might work. We are unable to test it. @enumerate @item -Copy the file @file{tm-vms.h} to @file{tm.h}, @file{xm-vms.h} to -@file{config.h}, @file{vax.md} to @file{md.} and @file{output-vax.c} -to @file{aux-output.c}.@refill +Comment out the @samp{#include "config.h"} line on line 37 of +@file{cccp.c} and do @samp{make cpp}. This makes a preliminary version +of GNU cpp. @item -Type @samp{@@make} to do recompile everything. +Save the old @file{/lib/cpp} and copy the preliminary GNU cpp to that +file name. -If you are compiling with a version of GCC older than 1.33, specify -@samp{/DEFINE=("inline=")} as an option in all the compilations. This -requires editing all the @code{gcc} commands in @file{make-cc1.com}. -(The older versions had problems supporting @code{inline}.) Once you -have a working 1.33 or newer GCC, you can change this file back. +@item +Undo your change in @file{cccp.c}, or reinstall the original version, +and do @samp{make cpp} again. + +@item +Copy this final version of GNU cpp into @file{/lib/cpp}. + +@item +Replace every occurance of @code{obstack_free} in @file{tree.c} +with @code{_obstack_free}. + +@item +Run @code{make} to get the first-stage GNU CC. + +@item +Reinstall the original version of @file{/lib/cpp}. + +@item +Now you can compile GNU CC with itself and install it in the normal +fashion. @end enumerate -To install the @samp{GCC} command so you can use the compiler easily, in +@node VMS Install,, 3B1 Install, Installation +@section Installing GNU CC on VMS + +The VMS version of GNU CC is distributed in a backup saveset containing +both source code and precompiled binaries. + +To install the @file{gcc} command so you can use the compiler easily, in the same manner as you use the VMS C compiler, you must install the VMS CLD file for GNU CC as follows: @@ -1701,24 +1907,25 @@ file for GNU CC as follows: @item Define the VMS logical names @samp{GNU_CC} and @samp{GNU_CC_INCLUDE} to point to the directories where the GNU CC executables -(@samp{gcc-cpp}, @samp{gcc-cc1}, etc.) and the C include files are +(@file{gcc-cpp}, @file{gcc-cc1}, etc.) and the C include files are kept. This should be done with the commands:@refill @example -$ assign /super /system disk:[gcc] gnu_cc -$ assign /super /system disk:[gcc.include] gnu_cc_include +$ assign /super /system disk:[gcc.] gnu_cc +$ assign /super /system disk:[gcc.include.] gnu_cc_include @end example @noindent with the appropriate disk and directory names. These commands can be placed in your system startup file so they will be executed whenever -the machine is rebooted. +the machine is rebooted. You may, if you choose, do this via the +@file{GCC_INSTALL.COM} script in the @file{[GCC]} directory. @item -Install the @samp{GCC} command with the command line: +Install the @file{GCC} command with the command line: @example -$ set command /table=sys$library:dcltables gnu_cc:gcc +$ set command /table=sys$library:dcltables gnu_cc:[000000]gcc @end example @item @@ -1734,6 +1941,52 @@ file.c}, which is equivalent to the comm Unix. @end enumerate +We try to put corresponding binaries and sources on the VMS distribution +tape. But sometimes the binaries will be from an older version that the +sources, because we don't always have time to update them. (Use the +@samp{/verbose} option to determine the version number of the binaries and +compare it with the source file @file{version.c} to tell whether this is +so.) In this case, you should use the binaries you get to recompile the +sources. If you must recompile, here is how: + +@enumerate +@item +Copy the file @file{tm-vms.h} to @file{tm.h}, @file{xm-vms.h} to +@file{config.h}, @file{vax.md} to @file{md.} and @file{out-vax.c} +to @file{aux-output.c}. The files to be copied are found in the +subdirectory named @file{config}; they should be copied to the +main directory of GNU CC.@refill + +@item +Setup the logical names and command tables as defined above. In +addition, define the vms logical name @samp{GNU_BISON} to point at the +to the directories where the Bison executable is kept. This should be +done with the command:@refill + +@example +$ assign /super /system disk:[bison.] gnu_bison +@end example + +You may, if you choose, use the @file{INSTALL_BISON.COM} script in the +@file{[BISON]} directory. + +@item +Install the @samp{BISON} command with the command line:@refill + +@example +$ set command /table=sys$library:dcltables gnu_bison:[000000]bison +@end example + +@item +Type @samp{@@make} to do recompile everything. + +If you are compiling with a version of GNU CC older than 1.33, specify +@samp{/DEFINE=("inline=")} as an option in all the compilations. This +requires editing all the @code{gcc} commands in @file{make-cc1.com}. +(The older versions had problems supporting @code{inline}.) Once you +have a working 1.33 or newer GNU CC, you can change this file back. +@end enumerate + There is a known problem on VMS: @code{const} global variables don't work compatibly with the VMS C compiler; we don't know a way to get them to the linker properly. @@ -1753,7 +2006,7 @@ or using GNU CC. @itemize @bullet @item On certain systems, defining certain environment variables such as -@samp{CC} can interfere with the functioning of @code{make}. +@code{CC} can interfere with the functioning of @code{make}. @item Cross compilation can run into trouble for certain machines because @@ -1862,6 +2115,7 @@ The best solution to these problems is t purposes instead of string constants. But if this is not possible, you can use the @samp{-fwritable-strings} flag, which directs GNU CC to handle string constants the same way most C compilers do. +@samp{-traditional} also has this effect, among others. @item GNU CC does not substitute macro arguments when they appear inside of @@ -1872,7 +2126,7 @@ string constants. For example, the foll @end example @noindent -will produce output @samp{"a"} regardless of what the argument @var{a} is. +will produce output @code{"a"} regardless of what the argument @var{a} is. The @samp{-traditional} option directs GNU CC to handle such cases (among others) in the old-fashioned (non-ANSI) fashion. @@ -1988,6 +2242,18 @@ method is not used in GNU CC because it You can tell GNU CC to use the PCC convention with the option @samp{-fpcc-struct-return}. + +@item +On the Sparc, GNU CC uses an incompatible calling convention for +structures. It passes them by including their contents in the argument +list, whereas the standard compiler passes them effectively by +reference. + +This really ought to be fixed, but such calling conventions are not +yet supported in GNU CC, so it isn't straightforward to fix it. + +The convention for structure returning is also incompatible, and +@samp{-fpcc-struct-return} does not help. @end itemize @node Extensions, Bugs, Incompatibilities, Top @@ -2020,8 +2286,8 @@ features in conditional compilation, che * Extended Asm:: Assembler instructions with C expressions as operands. (With them you can define ``built-in'' functions.) * Asm Labels:: Specifying the assembler name to use for a C symbol. -* Global Reg Vars:: Defining global variables which reside in registers. -* Alternate Keywords:: @code{__const}, @code{__asm}, etc., for header files. +* Explicit Reg Vars:: Defining variables residing in specified registers. +* Alternate Keywords:: @code{__const__}, @code{__asm__}, etc., for header files. @end menu @node Statement Exprs, Naming Types, Extensions, Extensions @@ -2127,7 +2393,7 @@ typeof (int *) Here the type described is that of pointers to @code{int}. If you are writing a header file that must work when included in ANSI C -programs, write @code{__typedef} instead of @code{typedef}. +programs, write @code{__typeof__} instead of @code{typeof}. @xref{Alternate Keywords}. A @code{typeof}-construct can be used anywhere a typedef name could be @@ -2179,7 +2445,7 @@ array (pointer (char), 4) y; @end example @noindent -Thus, @samp{array (pointer (char), 4)} is the type of arrays of 4 +Thus, @code{array (pointer (char), 4)} is the type of arrays of 4 pointers to @code{char}. @end itemize @@ -2219,8 +2485,8 @@ expressions are equivalent: A cast is a valid lvalue if its operand is valid. Taking the address of the cast is the same as taking the address without a cast, except for the type of the result. For example, these two expressions are equivalent (but -the second may be valid when the type of @samp{a} does not permit a cast to -@samp{int *}). +the second may be valid when the type of @code{a} does not permit a cast to +@code{int *}). @example &(int *)a @@ -2231,7 +2497,7 @@ A simple assignment whose left-hand side right-hand side first to the specified type, then to the type of the inner left-hand side expression. After this is stored, the value is converter back to the specified type to become the value of the assignment. Thus, if -@samp{a} has type @samp{char *}, the following two expressions are +@code{a} has type @code{char *}, the following two expressions are equivalent: @example @@ -2379,12 +2645,15 @@ size of a @code{void} or of a function a A consequence of this is that @code{sizeof} is also allowed on @code{void} and on function types, and returns 1. +The option @samp{-Wpointer-arith} requests a warning if these extensions +are used. + @node Initializers, Constructors, Pointer Arith, Extensions @section Non-Constant Initializers -The elements of an aggregate initializer are not required to be constant -expressions in GNU C. Here is an example of an initializer with run-time -varying elements: +The elements of an aggregate initializer for an automatic variable are +not required to be constant expressions in GNU C. Here is an example of +an initializer with run-time varying elements: @example foo (float f, float g) @@ -2409,7 +2678,7 @@ struct foo @{int a; char b[2];@} structu @end example @noindent -Here is an example of constructing a @samp{struct foo} with a constructor: +Here is an example of constructing a @code{struct foo} with a constructor: @example structure = ((struct foo) @{x + y, 'a', 0@}); @@ -2444,7 +2713,7 @@ latter does the same thing an ordinary C output = ((int[]) @{ 2, x, 28 @}) [input]; @end example -@node Function Attributes, Dollar Signs, Constructors +@node Function Attributes, Dollar Signs, Constructors, Extensions @section Declaring Attributes of Functions In GNU C, you declare certain things about functions called in your program @@ -2505,20 +2774,20 @@ many traditional C implementations allow @node Alignment, Inline, Dollar Signs, Extensions @section Inquiring about the Alignment of a Type or Variable -The keyword @code{__alignof} allows you to inquire about how an object +The keyword @code{__alignof__} allows you to inquire about how an object is aligned, or the minimum alignment usually required by a type. Its syntax is just like @code{sizeof}. For example, if the target machine requires a @code{double} value to be -aligned on an 8-byte boundary, then @code{__alignof (double)} is 8. This -is true on many RISC machines. On more traditional machine designs, -@code{__alignof (double)} is 4 or even 2. +aligned on an 8-byte boundary, then @code{__alignof__ (double)} is 8. +This is true on many RISC machines. On more traditional machine +designs, @code{__alignof__ (double)} is 4 or even 2. Some machines never actually require alignment; they allow reference to any -data type even at an odd addresses. For these machines, @code{__alignof} +data type even at an odd addresses. For these machines, @code{__alignof__} reports the @emph{recommended} alignment of a type. -When the operand of @code{__alignof} is an lvalue rather than a type, the +When the operand of @code{__alignof__} is an lvalue rather than a type, the value is the largest alignment that the lvalue is known to have. It may have this alignment as a result of its data type, or because it is part of a structure and inherits alignment from that structure. For example, after @@ -2529,9 +2798,9 @@ struct foo @{ int x; char y; @} foo1; @end example @noindent -the value of @code{__alignof (foo1.y)} is probably 2 or 4, the same as -@code{__alignof (int)}, even though the data type of @code{foo1.y} does not -itself demand any alignment.@refill +the value of @code{__alignof__ (foo1.y)} is probably 2 or 4, the same as +@code{__alignof__ (int)}, even though the data type of @code{foo1.y} +does not itself demand any alignment.@refill @node Inline, Extended Asm, Alignment, Extensions @section An Inline Function is As Fast As a Macro @@ -2555,21 +2824,23 @@ inc (int *a) @end example (If you are writing a header file to be included in ANSI C programs, write -@code{__inline} instead of @code{inline}. @xref{Alternate Keywords}.) +@code{__inline__} instead of @code{inline}. @xref{Alternate Keywords}.) You can also make all ``simple enough'' functions inline with the option @samp{-finline-functions}. Note that certain usages in a function definition can make it unsuitable for inline substitution. When a function is both inline and @code{static}, if all calls to the -function are integrated into the caller, then the function's own assembler -code is never referenced. In this case, GNU CC does not actually output -assembler code for the function, unless you specify the option -@samp{-fkeep-inline-functions}. Some calls cannot be integrated for -various reasons (in particular, calls that precede the function's -definition cannot be integrated, and neither can recursive calls within the -definition). If there is a nonintegrated call, then the function is -compiled to assembler code as usual. +function are integrated into the caller, and the function's address is +never used, then the function's own assembler code is never referenced. +In this case, GNU CC does not actually output assembler code for the +function, unless you specify the option @samp{-fkeep-inline-functions}. +Some calls cannot be integrated for various reasons (in particular, +calls that precede the function's definition cannot be integrated, and +neither can recursive calls within the definition). If there is a +nonintegrated call, then the function is compiled to assembler code as +usual. The function must also be compiled as usual if the program +refers to its address, because that can't be inlined. When an inline function is not @code{static}, then the compiler must assume that there may be calls from other source files; since a global symbol can @@ -2578,6 +2849,20 @@ the other source files, so the calls the Therefore, a non-@code{static} inline function is always compiled on its own in the usual fashion. +If you specify both @code{inline} and @code{extern} in the function +definition, then the definition is used only for inlining. In no case +is the function compiled on its own, not even if you refer to its +address explicitly. Such an address becomes an external reference, as +if you had only declared the function, and had not defined it. + +This combination of @code{inline} and @code{extern} has almost the +effect of a macro. The way to use it is to put a function definition in +a header file with these keywords, and put another copy of the +definition (lacking @code{inline} and @code{extern}) in a library file. +The definition in the header file will cause most calls to the function +to be inlined. If any uses of the function remain, they will refer to +the single copy in the library. + @node Extended Asm, Asm Labels, Inline, Extensions @section Assembler Instructions with C Expression Operands @@ -2625,15 +2910,19 @@ that the compiler itself does not know e The output operands must be write-only; GNU CC will assume that the values in these operands before the instruction are dead and need not be -generated. For an operand that is read-write, or in which not all bits are -written and the other bits contain useful information, you must logically +generated. Extended asm does not support input-output or read-write +operands. For this reason, the constraint character @samp{+}, which +indicates such an operand, may not be used. + +When the assembler instruction has a read-write operand, or an operand +in which only some of the bits are to be changed, you must logically split its function into two separate operands, one input operand and one write-only output operand. The connection between them is expressed by constraints which say they need to be in the same location when the -instruction executes. You can use the same C expression for both operands, -or different expressions. For example, here we write the (fictitious) -@samp{combine} instruction with @code{bar} as its read-only source operand -and @code{foo} as its read-write destination: +instruction executes. You can use the same C expression for both +operands, or different expressions. For example, here we write the +(fictitious) @samp{combine} instruction with @code{bar} as its read-only +source operand and @code{foo} as its read-write destination: @example asm ("combine %2,%0" : "=r" (foo) : "0" (foo), "g" (bar)); @@ -2766,15 +3055,15 @@ test it. This problem doesn't arise for ``compare'' instructions because they don't have any output operands. If you are writing a header file that should be includable in ANSI C -programs, write @code{__asm} instead of @code{asm}. @xref{Alternate +programs, write @code{__asm__} instead of @code{asm}. @xref{Alternate Keywords}. -@node Asm Labels, Global Reg Vars, Extended Asm, Extensions +@node Asm Labels, Explicit Reg Vars, Extended Asm, Extensions @section Controlling Names Used in Assembler Code -You can specify the name to be used in the assembler code for a C function -or variable by writing the @code{asm} (or @code{__asm}) keyword after the -declarator as follows: +You can specify the name to be used in the assembler code for a C +function or variable by writing the @code{asm} (or @code{__asm__}) +keyword after the declarator as follows: @example int foo asm ("myfoo") = 2; @@ -2807,12 +3096,36 @@ register name; that would produce comple CC does not as yet have the ability to store static variables in registers. Perhaps that will be added. -@node Global Reg Vars, Alternate Keywords, Asm Labels, Extensions -@section Global Variables in Registers +@node Explicit Reg Vars, Alternate Keywords, Asm Labels, Extensions +@section Variables in Specified Registers + +GNU C allows you to put a few global variables into specified hardware +registers. You can also specify the register in which an ordinary +register variable should be allocated. + +@itemize @bullet +@item +Global register variables reserve registers throughout the program. +This may be useful in programs such as programming language +interpreters which have a couple of global variables that are accessed +very often. + +@item +Local register variables in specific registers do not reserve the +registers. The compiler's data flow analysis is capable of +determining where the specified registers contain live values, and +where they are available for other uses. These local variables are +sometimes convenient for use with the extended @code{asm} feature +(@pxref{Extended Asm}). +@end itemize + +@menu +* Global Reg Vars:: +* Local Reg Vars:: +@end menu -A few programs, such as programming language interpreters, may have a -couple of global variables that are accessed so often that it is worth -while to reserve registers throughout the program just for them. +@node Global Reg Vars, Local Reg Vars, Explicit Reg Vars, Explicit Reg Vars +@subsection Defining Global Register Variables You can define a global register variable in GNU C like this: @@ -2829,7 +3142,7 @@ Naturally the register name is cpu-depen conditionalize your program according to cpu type. The register @code{a5} would be a good choice on a 68000 for a variable of pointer type. On machines with register windows, be sure to choose a ``global'' -register that is not affected by the function call mechanism. +register that is not affected magically by the function call mechanism. In addition, operating systems on one type of cpu may differ in how they name the registers; then you would need additional conditionals. For @@ -2892,7 +3205,43 @@ being used for other purposes in the pre Global register variables may not have initial values, because an executable file has no means to supply initial contents for a register. -@node Alternate Keywords,, Global Reg Vars, Extensions +@node Local Reg Vars,, Local Reg Vars, Explicit Reg Vars +@subsection Specifying Registers for Local Variables + +You can define a local register variable with a specified register +like this: + +@example +register int *foo asm ("a5"); +@end example + +@noindent +Here @code{a5} is the name of the register which should be used. Note +that this is the same syntax used for defining global register +variables, but for a local variable it would appear within a function. + +Naturally the register name is cpu-dependent, but this is not a +problem, since specific registers are most often useful with explicit +assembler instructions (@pxref{Extended Asm}). Both of these things +generally require that you conditionalize your program according to +cpu type. + +In addition, operating systems on one type of cpu may differ in how they +name the registers; then you would need additional conditionals. For +example, some 68000 operating systems call this register @code{%a5}. + +Eventually there may be a way of asking the compiler to choose a register +automatically, but first we need to figure out how it should choose and +how to enable you to guide the choice. No solution is evident. + +Defining such a register variable does not reserve the register; it +remains available for other uses in places where flow control +determines the variable's value is not live. However, these registers +made unavailable for use in the reload pass. I would not be surprised +if excessive use of this feature leaves the compiler too few available +registers to compile certain functions. + +@node Alternate Keywords,, Explicit Reg Vars, Extensions @section Alternate Keywords The option @samp{-traditional} disables certain keywords; @samp{-ansi} @@ -2905,10 +3254,10 @@ the keywords @code{const}, @code{volatil and @code{inline} won't work in a program compiled with @samp{-traditional}.@refill -The way to solve these problems is to put @samp{__} in front of each -problematical keyword. For example, use @code{__asm} instead of @code{asm}, -@code{__const} instead of @code{const}, and @code{__inline} instead of -@code{inline}. +The way to solve these problems is to put @samp{__} at the beginning and +end of each problematical keyword. For example, use @code{__asm__} +instead of @code{asm}, @code{__const__} instead of @code{const}, and +@code{__inline__} instead of @code{inline}. Other C compilers won't accept these alternative keywords; if you want to compile with another compiler, you can define the alternate keywords as @@ -2916,7 +3265,7 @@ macros to replace them with the customar @example #ifndef __GNUC__ -#define __asm asm +#define __asm__ asm #endif @end example @@ -2968,13 +3317,14 @@ by chance to give the desired results wi For example, in many nonoptimizing compilers, you can write @samp{x;} at the end of a function instead of @samp{return x;}, with the same -results. But the value of the function is undefined if @samp{return} +results. But the value of the function is undefined if @code{return} is omitted; it is not a bug when GNU CC produces different results. Problems often result from expressions with two increment operators, -as in @samp{f (*p++, *p++)}. Your previous compiler might have +as in @code{f (*p++, *p++)}. Your previous compiler might have interpreted that expression the way you intended; GNU CC might -interpret it another way; neither compiler is wrong. +interpret it another way. Neither compiler is wrong. The bug is +in your code. After you have localized the error to a single source line, it should be easy to check for these things. If your program is correct and @@ -3022,7 +3372,20 @@ bug-gcc@@prep.ai.mit.edu @{ucbvax|mit-eddie|uunet@}!prep.ai.mit.edu!bug-gcc @end example -As a last resort, snail them to: +@strong{Do not send bug reports to @samp{info-gcc}, or to the newsgroup +@samp{gnu.gcc}.} Most users of GNU CC do not want to receive bug +reports. Those that do, have asked to be on @samp{bug-gcc}. + +The mailing list @samp{bug-gcc} has a newsgroup which serves as a +repeater. The mailing list and the newsgroup carry exactly the same +messages. Often people think of posting bug reports to the newsgroup +instead of mailing them. This appears to work, but it has one problem +which can be crucial: a newsgroup posting does not contain a mail path +back to the sender. Thus, if I need to ask for more information, I +may be unable to reach you. For this reason, it is better to send bug +reports to the mailing list. + +As a last resort, send bug reports on paper to: @example GNU Compiler Bugs @@ -3031,8 +3394,8 @@ Cambridge, MA 02139 @end example The fundamental principle of reporting bugs usefully is this: -@strong{report all the facts}. If you are not sure whether to mention a -fact or leave it out, mention it! +@strong{report all the facts}. If you are not sure whether to state a +fact or leave it out, state it! Often people omit facts because they think they know what causes the problem and they conclude that some details don't matter. Thus, you might @@ -3041,10 +3404,20 @@ Well, probably it doesn't, but one canno stray memory reference which happens to fetch from the location where that name is stored in memory; perhaps, if the name were different, the contents of that location would fool the compiler into doing the right thing despite -the bug. Play it safe and give an exact example. +the bug. Play it safe and give a specific, complete example. That is the +easiest thing for you to do, and the most helpful. -If you want to enable me to fix the bug, you should include all these -things: +Keep in mind that the purpose of a bug report is to enable me to fix +the bug if it is not known. It isn't very important what happens if +the bug is already known. Therefore, always write your bug reports on +the assumption that the bug is not known. + +Sometimes people give a few sketchy facts and ask, ``Does this ring a +bell?'' Those bug reports are useless, and I urge everyone to +@emph{refuse to respond to them} except to chide the sender to report +bugs properly. + +To enable me to fix the bug, you should include all these things: @itemize @bullet @item @@ -3110,13 +3483,14 @@ then when mine fails to crash, I would k happening for me. If you had not told me to expect a crash, then I would not be able to draw any conclusion from my observations. -In cases where GNU CC generates incorrect code, if you send me a small -complete sample program I will find the error myself by running the -program under a debugger. If you send me a large example or a part of -a larger program, I cannot do this; you must debug the compiled -program and narrow the problem down to one source line. Tell me which -source line it is, and what you believe is incorrect about the code -generated for that line. +Often the observed symptom is incorrect output when your program is run. +Sad to say, this is not enough information for me unless the program is +short and simple. If you send me a large program, I don't have time to +figure out how it would work if compiled correctly, much less which line +of it was compiled wrong. So you will have to do that. Tell me which +source line it is, and what incorrect result happens when that line is +executed. A person who understands the test program can find this as +easily as a bug in the program itself. @item If you send me examples of output from GNU CC, please use @samp{-g} @@ -3151,7 +3525,7 @@ they point to (and most of the contents In addition, most compiler passes consist of one or more loops that scan the RTL insn sequence. The most vital piece of information about -such a loop--which insn it has reached--is usually in a local variable, +such a loop---which insn it has reached---is usually in a local variable, not in an argument. What you need to provide in addition to a backtrace are the values of @@ -3181,6 +3555,7 @@ changes will not affect it. This is often time consuming and not very useful, because the way I will find the bug is by running a single example under the debugger with breakpoints, not by pure deduction from a series of examples. +I recommend that you save your time for something else. Of course, if you can find a simpler example to report @emph{instead} of the original one, that is a convenience for me. Errors in the @@ -3189,28 +3564,34 @@ less time, etc. Most GNU CC bugs involv most straightforward way to simplify an example is to delete all the function definitions except the one where the bug occurs. Those earlier in the file may be replaced by external declarations if the -crucial function depends on them. +crucial function depends on them. (Exception: inline functions may +affect compilation of functions defined later in the file.) However, simplification is not vital; if you don't want to do this, -report the bug anyway. +report the bug anyway and send me the entire test case you used. @item A patch for the bug. A patch for the bug does help me if it is a good one. But don't omit -the necessary information, such as the test case, because I might see -problems with your patch and decide to fix the problem another way. +the necessary information, such as the test case, on the assumption that +a patch is all I need. I might see problems with your patch and decide +to fix the problem another way, or I might not understand it at all. Sometimes with a program as complicated as GNU CC it is very hard to construct an example that will make the program follow a certain path through the code. If you don't send me the example, I won't be able to construct one, so I won't be able to verify that the bug is fixed. +And if I can't understand what bug you are trying to fix, or why your +patch should be an improvement, I won't install it. A test case will +help me to understand. + @item A guess about what the bug is or what it depends on. Such guesses are usually wrong. Even I can't guess right about such -things without using the debugger to find the facts. +things without first using the debugger to find the facts. @end itemize @node Portability, Interface, Bugs, Top @@ -3462,8 +3843,9 @@ this pass. This dump file's name is mad the input file name. @item -Loop optimization. This pass moves constant expressions out of loops. -Its source file is @file{loop.c}. +Loop optimization. This pass moves constant expressions out of loops, +and optionally does strength-reduction as well. Its source file is +@file{loop.c}. The option @samp{-dL} causes a debugging dump of the RTL code after this pass. This dump file's name is made by appending @samp{.loop} to @@ -3549,6 +3931,14 @@ this pass. This dump file's name is mad to the input file name. @item +Delayed branch scheduling may be done at this point. The source file +name is @file{dbranch.c}. + +The option @samp{-dd} causes a debugging dump of the RTL code after +this pass. This dump file's name is made by appending @samp{.dbr} +to the input file name. + +@item Final. This pass outputs the assembler code for the function. It is also responsible for identifying spurious test and compare instructions. Machine-specific peephole optimizations are performed @@ -3647,7 +4037,7 @@ short) is a C structure, but it is usual type that is given the typedef name @code{rtx}. An integer is simply an @code{int}, and a string is a @code{char *}. -Within RTL code, strings appear only inside @samp{symbol_ref} expressions, +Within RTL code, strings appear only inside @code{symbol_ref} expressions, but they appear in other contexts in the RTL expressions that make up machine descriptions. Their written form uses decimal digits. @@ -3676,10 +4066,10 @@ The expression code determines how many and what kinds of objects they are. In RTL, unlike Lisp, you cannot tell by looking at an operand what kind of object it is. Instead, you must know from its context---from the expression code of the containing expression. -For example, in an expression of code @samp{subreg}, the first operand is +For example, in an expression of code @code{subreg}, the first operand is to be regarded as an expression and the second operand as an integer. In -an expression of code @samp{plus}, there are two operands, both of which -are to be regarded as expressions. In a @samp{symbol_ref} expression, +an expression of code @code{plus}, there are two operands, both of which +are to be regarded as expressions. In a @code{symbol_ref} expression, there is one operand, which is to be regarded as a string. Expressions are written as parentheses containing the name of the @@ -3688,7 +4078,7 @@ of the expression (separated by spaces). Expression code names in the @samp{md} file are written in lower case, but when they appear in C code they are written in upper case. In this -manual, they are shown as follows: @samp{const_int}. +manual, they are shown as follows: @code{const_int}. In a few contexts a null pointer is valid where an expression is normally wanted. The written form of this is @code{(nil)}. @@ -3701,7 +4091,7 @@ objects and their kinds, with four possi (actually a pointer to an expression), @samp{i} for integer, @samp{s} for string, and @samp{E} for vector of expressions. The sequence of letters for an expression code is called its @dfn{format}. Thus, the format of -@samp{subreg} is @samp{ei}.@refill +@code{subreg} is @samp{ei}.@refill Two other format characters are used occasionally: @samp{u} and @samp{0}. @samp{u} is equivalent to @samp{e} except that it is printed differently in @@ -3746,7 +4136,7 @@ stored in the operand. You would do thi the containing expression. That is also how you would know how many operands there are. -For example, if @var{x} is a @samp{subreg} expression, you know that it has +For example, if @var{x} is a @code{subreg} expression, you know that it has two operands which can be correctly accessed as @code{XEXP (@var{x}, 0)} and @code{XINT (@var{x}, 1)}. If you did @code{XINT (@var{x}, 0)}, you would get the address of the expression operand but cast as an integer; @@ -3792,23 +4182,23 @@ following macros: @table @code @item MEM_VOLATILE_P (@var{x}) -In @samp{mem} expressions, nonzero for volatile memory references. +In @code{mem} expressions, nonzero for volatile memory references. Stored in the @code{volatil} field and printed as @samp{/v}. @item MEM_IN_STRUCT_P (@var{x}) -In @samp{mem} expressions, nonzero for reference to an entire +In @code{mem} expressions, nonzero for reference to an entire structure, union or array, or to a component of one. Zero for references to a scalar variable or through a pointer to a scalar. Stored in the @code{in_struct} field and printed as @samp{/s}. @item REG_USER_VAR_P (@var{x}) -In a @samp{reg}, nonzero if it corresponds to a variable present in +In a @code{reg}, nonzero if it corresponds to a variable present in the user's source code. Zero for temporaries generated internally by the compiler. Stored in the @code{volatil} field and printed as @samp{/v}. @item REG_FUNCTION_VALUE_P (@var{x}) -Nonzero in a @samp{reg} if it is the place in which this function's +Nonzero in a @code{reg} if it is the place in which this function's value is going to be returned. (This happens only in a hard register.) Stored in the @code{integrated} field and printed as @samp{/i}. @@ -3818,7 +4208,7 @@ functions called by this one, but @code{ in this kind of use. @item RTX_UNCHANGING_P (@var{x}) -Nonzero in a @samp{reg} or @samp{mem} if the value is not changed +Nonzero in a @code{reg} or @code{mem} if the value is not changed explicitly by the current function. (If it is a memory reference then it may be changed by other functions or by aliasing.) Stored in the @code{unchanging} field and printed as @samp{/u}. @@ -3833,7 +4223,7 @@ In an insn, nonzero if the insn has been @code{volatil} field and printed as @samp{/v}. @item CONSTANT_POOL_ADDRESS_P (@var{x}) -Nonzero in a @samp{symbol_ref} if it refers to part of the current +Nonzero in a @code{symbol_ref} if it refers to part of the current function's ``constants pool''. These are addresses close to the beginning of the function, and GNU CC assumes they can be addressed directly (perhaps with the help of base registers). Stored in the @@ -3850,19 +4240,19 @@ Expressions that appear more than once a rules for shared structure (@pxref{Sharing}). @item volatil -This flag is used in @samp{mem} and @samp{reg} expressions and in insns. +This flag is used in @code{mem} and @code{reg} expressions and in insns. In RTL dump files, it is printed as @samp{/v}. -In a @samp{mem} expression, it is 1 if the memory reference is volatile. +In a @code{mem} expression, it is 1 if the memory reference is volatile. Volatile memory references may not be deleted, reordered or combined. -In a @samp{reg} expression, it is 1 if the value is a user-level variable. +In a @code{reg} expression, it is 1 if the value is a user-level variable. 0 indicates an internal compiler temporary. In an insn, 1 means the insn has been deleted. @item in_struct -This flag is used in @samp{mem} expressions. It is 1 if the memory +This flag is used in @code{mem} expressions. It is 1 if the memory datum referred to is all or part of a structure or array; 0 if it is (or might be) a scalar variable. A reference through a C pointer has 0 because the pointer might point to a scalar variable. @@ -3873,7 +4263,7 @@ cases of aliasing. In an RTL dump, this flag is represented as @samp{/s}. @item unchanging -This flag is used in @samp{reg} and @samp{mem} expressions. 1 means +This flag is used in @code{reg} and @code{mem} expressions. 1 means that the value of the expression never changes (at least within the current function). @@ -3883,7 +4273,7 @@ In an RTL dump, this flag is represented In some kinds of expressions, including insns, this flag means the rtl was produced by procedure integration. -In a @samp{reg} expression, this flag indicates the register +In a @code{reg} expression, this flag indicates the register containing the value to be returned by the current function. On machines that pass parameters in registers, the same register number may be used for parameters as well, but this flag is not set on such @@ -3902,7 +4292,7 @@ expressions (declarations and types, to In debugging dumps and machine descriptions, the machine mode of an RTL expression is written after the expression code with a colon to separate them. The letters @samp{mode} which appear at the end of each machine mode -name are omitted. For example, @code{(reg:SI 38)} is a @samp{reg} +name are omitted. For example, @code{(reg:SI 38)} is a @code{reg} expression with machine mode @code{SImode}. If the mode is @code{VOIDmode}, it is not written at all. @@ -3959,7 +4349,7 @@ which have no such instructions, @code{B @item VOIDmode Void mode means the absence of a mode or an unspecified mode. -For example, RTL expressions of code @samp{const_int} have mode +For example, RTL expressions of code @code{const_int} have mode @code{VOIDmode} because they can be taken to have whatever mode the context requires. In debugging dumps of RTL, @code{VOIDmode} is expressed by the absence of any mode. @@ -4080,7 +4470,7 @@ is customarily accessed with the macro @ There is only one expression object for the integer value zero; it is the value of the variable @code{const0_rtx}. Likewise, the only expression for integer value one is found in @code{const1_rtx}. -Any attempt to create an expression of code @samp{const_int} and +Any attempt to create an expression of code @code{const_int} and value zero or one will return @code{const0_rtx} or @code{const1_rtx} as appropriate. @@ -4096,17 +4486,17 @@ precision), then they represent a @code{ @example union @{ double d; int i[2];@} u; -u.i[0] = XINT (x, 0); -u.i[1] = XINT (x, 1); +u.i[0] = CONST_DOUBLE_LOW(x); +u.i[1] = CONST_DOUBLE_HIGH(x); @end example @noindent and then refer to @code{u.d}. The global variables @code{dconst0_rtx} and @code{fconst0_rtx} hold -@samp{const_double} expressions with value 0, in modes @code{DFmode} +@code{const_double} expressions with value 0, in modes @code{DFmode} and @code{SFmode}, respectively. The macro @code{CONST0_RTX -(@var{mode})} refers to a @samp{const_double} expression with value 0 +(@var{mode})} refers to a @code{const_double} expression with value 0 in mode @var{mode}. The mode @var{mode} must be of mode class @code{MODE_FLOAT}. @@ -4119,7 +4509,7 @@ the @samp{*}. Otherwise, the label is @ @item (label_ref @var{label}) Represents the value of an assembler label for code. It contains one -operand, an expression, which must be a @samp{code_label} that appears +operand, an expression, which must be a @code{code_label} that appears in the instruction sequence to identify the place where the label should go. @@ -4129,9 +4519,9 @@ references is so that jump optimization @item (const @var{exp}) Represents a constant that is the result of an assembly-time arithmetic computation. The operand, @var{exp}, is an expression that -contains only constants (@samp{const_int}, @samp{symbol_ref} and -@samp{label_ref} expressions) combined with @samp{plus} and -@samp{minus}. However, not all combinations are valid, since the +contains only constants (@code{const_int}, @code{symbol_ref} and +@code{label_ref} expressions) combined with @code{plus} and +@code{minus}. However, not all combinations are valid, since the assembler cannot do arbitrary arithmetic on relocatable symbols. @end table @@ -4160,7 +4550,7 @@ hard register numbers, even those that c instructions or can hold only certain types of data. Each pseudo register number used in a function's RTL code is -represented by a unique @samp{reg} expression. +represented by a unique @code{reg} expression. @var{m} is the machine mode of the reference. It is necessary because machines can generally refer to each register in more than one mode. @@ -4175,16 +4565,16 @@ the mode must always be specified. A hard register may be accessed in various modes throughout one function, but each pseudo register is given a natural mode and is accessed only in that mode. When it is necessary to describe -an access to a pseudo register using a nonnatural mode, a @samp{subreg} +an access to a pseudo register using a nonnatural mode, a @code{subreg} expression is used. -A @samp{reg} expression with a machine mode that specifies more than +A @code{reg} expression with a machine mode that specifies more than one word of data may actually stand for several consecutive registers. If in addition the register number specifies a hardware register, then it actually represents several consecutive hardware registers starting with the specified one. -Such multi-word hardware register @samp{reg} expressions must not be live +Such multi-word hardware register @code{reg} expressions must not be live across the boundary of a basic block. The lifetime analysis pass does not know how to record properly that several consecutive registers are actually live there, and therefore register allocation would be confused. @@ -4192,21 +4582,21 @@ The CSE pass must go out of its way to m not arise. @item (subreg:@var{m} @var{reg} @var{wordnum}) -@samp{subreg} expressions are used to refer to a register in a machine +@code{subreg} expressions are used to refer to a register in a machine mode other than its natural one, or to refer to one register of -a multi-word @samp{reg} that actually refers to several registers. +a multi-word @code{reg} that actually refers to several registers. Each pseudo-register has a natural mode. If it is necessary to operate on it in a different mode---for example, to perform a fullword -move instruction on a pseudo-register that contains a single byte--- -the pseudo-register must be enclosed in a @samp{subreg}. In such -a case, @var{wordnum} is zero. +move instruction on a pseudo-register that contains a single +byte---the pseudo-register must be enclosed in a @code{subreg}. In +such a case, @var{wordnum} is zero. -The other use of @samp{subreg} is to extract the individual registers +The other use of @code{subreg} is to extract the individual registers of a multi-register value. Machine modes such as @code{DImode} and @code{EPmode} indicate values longer than a word, values which usually require two consecutive registers. To access one of the registers, -use a @samp{subreg} with mode @code{SImode} and a @var{wordnum} that +use a @code{subreg} with mode @code{SImode} and a @var{wordnum} that says which register. The compilation parameter @code{WORDS_BIG_ENDIAN}, if defined, says @@ -4214,12 +4604,12 @@ that word number zero is the most signif the least significant part. Between the combiner pass and the reload pass, it is possible to have -a @samp{subreg} which contains a @samp{mem} instead of a @samp{reg} as +a @code{subreg} which contains a @code{mem} instead of a @code{reg} as its first operand. The reload pass eliminates these cases by -reloading the @samp{mem} into a suitable register. +reloading the @code{mem} into a suitable register. Note that it is not valid to access a @code{DFmode} value in @code{SFmode} -using a @samp{subreg}. On some machines the most significant part of a +using a @code{subreg}. On some machines the most significant part of a @code{DFmode} value does not have the same format as a single-precision floating value. @@ -4228,12 +4618,12 @@ This refers to the machine's condition c operands and may not have a machine mode. It may be validly used in only two contexts: as the destination of an assignment (in test and compare instructions) and in comparison operators comparing against -zero (@samp{const_int} with value zero; that is to say, +zero (@code{const_int} with value zero; that is to say, @code{const0_rtx}). -There is only one expression object of code @samp{cc0}; it is the +There is only one expression object of code @code{cc0}; it is the value of the variable @code{cc0_rtx}. Any attempt to create an -expression of code @samp{cc0} will return @code{cc0_rtx}. +expression of code @code{cc0} will return @code{cc0_rtx}. One special thing about the condition code register is that instructions can set it implicitly. On many machines, nearly all @@ -4250,9 +4640,9 @@ This represents the machine's program co may not have a machine mode. @code{(pc)} may be validly used only in certain specific contexts in jump instructions. -There is only one expression object of code @samp{pc}; it is the value +There is only one expression object of code @code{pc}; it is the value of the variable @code{pc_rtx}. Any attempt to create an expression of -code @samp{pc} will return @code{pc_rtx}. +code @code{pc} will return @code{pc_rtx}. All instructions that do not jump alter the program counter implicitly by incrementing it, but there is no need to mention this in the RTL. @@ -4273,12 +4663,12 @@ carried out in machine mode @var{m}. Th @var{x} and @var{y} both are valid for mode @var{m}. @item (minus:@var{m} @var{x} @var{y}) -Like @samp{plus} but represents subtraction. +Like @code{plus} but represents subtraction. @item (compare @var{x} @var{y}) Represents the result of subtracting @var{y} from @var{x} for purposes of comparison. The absence of a machine mode -in the @samp{compare} expression indicates that the result is +in the @code{compare} expression indicates that the result is computed without overflow, as if with infinite precision. Of course, machines can't really subtract with infinite precision. @@ -4303,13 +4693,13 @@ Widening multiplication and same-size mu distinct and supported by different machine instructions; machines may support one but not the other.@refill -@samp{mult} may be used for floating point multiplication as well. +@code{mult} may be used for floating point multiplication as well. Then @var{m} is a floating point machine mode. @item (umult:@var{m} @var{x} @var{y}) -Like @samp{mult} but represents unsigned multiplication. It may be -used in both same-size and widening forms, like @samp{mult}. -@samp{umult} is used only for fixed-point multiplication. +Like @code{mult} but represents unsigned multiplication. It may be +used in both same-size and widening forms, like @code{mult}. +@code{umult} is used only for fixed-point multiplication. @item (div:@var{m} @var{x} @var{y}) Represents the quotient in signed division of @var{x} by @var{y}, @@ -4318,15 +4708,15 @@ mode, it represents the exact quotient; quotient. If @var{x} and @var{y} are both valid for mode @var{m}, this is ordinary size-preserving division. Some machines have division instructions in which the operands and quotient widths are -not all the same; such instructions are represented by @samp{div} +not all the same; such instructions are represented by @code{div} expressions in which the machine modes are not all the same. @item (udiv:@var{m} @var{x} @var{y}) -Like @samp{div} but represents unsigned division. +Like @code{div} but represents unsigned division. @item (mod:@var{m} @var{x} @var{y}) @itemx (umod:@var{m} @var{x} @var{y}) -Like @samp{div} and @samp{udiv} but represent the remainder instead of +Like @code{div} and @code{udiv} but represent the remainder instead of the quotient. @item (not:@var{m} @var{x}) @@ -4368,11 +4758,11 @@ to be negative constants or else compute by negation. @item (ashift:@var{m} @var{x} @var{c}) -Like @samp{lshift} but for arithmetic left shift. +Like @code{lshift} but for arithmetic left shift. @item (lshiftrt:@var{m} @var{x} @var{c}) @itemx (ashiftrt:@var{m} @var{x} @var{c}) -Like @samp{lshift} and @samp{ashift} but for right shift. +Like @code{lshift} and @code{ashift} but for right shift. @item (rotate:@var{m} @var{x} @var{c}) @itemx (rotatert:@var{m} @var{x} @var{c}) @@ -4406,7 +4796,7 @@ would be invalid as the machine mode cou a comparison should never exist in RTL due to constant folding. Inequality comparisons come in two flavors, signed and unsigned. Thus, -there are distinct expression codes @samp{gt} and @samp{gtu} for signed and +there are distinct expression codes @code{gt} and @code{gtu} for signed and unsigned greater-than. These can produce different results for the same pair of integer values: for example, 1 is signed greater-than -1 but not unsigned greater-than, because -1 when regarded as unsigned is actually @@ -4438,19 +4828,19 @@ otherwise 0. the comparison is done in a signed sense. @item (gtu @var{x} @var{y}) -Like @samp{gt} but does unsigned comparison, on fixed-point numbers only. +Like @code{gt} but does unsigned comparison, on fixed-point numbers only. @item (lt @var{x} @var{y}) @item (ltu @var{x} @var{y}) -Like @samp{gt} and @samp{gtu} but test for ``less than''. +Like @code{gt} and @code{gtu} but test for ``less than''. @item (ge @var{x} @var{y}) @item (geu @var{x} @var{y}) -Like @samp{gt} and @samp{gtu} but test for ``greater than or equal''. +Like @code{gt} and @code{gtu} but test for ``greater than or equal''. @item (le @var{x} @var{y}) @item (leu @var{x} @var{y}) -Like @samp{gt} and @samp{gtu} but test for ``less than or equal''. +Like @code{gt} and @code{gtu} but test for ``less than or equal''. @item (if_then_else @var{cond} @var{then} @var{else}) This is not a comparison operation but is listed here because it is @@ -4459,7 +4849,7 @@ precise, @var{cond} is a comparison expr represents a choice, according to @var{cond}, between the value represented by @var{then} and the one represented by @var{else}. -On most machines, @samp{if_then_else} expressions are valid only +On most machines, @code{if_then_else} expressions are valid only to express conditional jumps. @end table @@ -4484,7 +4874,7 @@ but typically @var{loc} should be a sing or a full word in a register. @item (zero_extract:SI @var{loc} @var{size} @var{pos}) -Like @samp{sign_extract} but refers to an unsigned or zero-extended +Like @code{sign_extract} but refers to an unsigned or zero-extended bit field. The same sequence of bits are extracted, but they are filled to an entire word with zeros instead of by sign-extension. @end table @@ -4495,7 +4885,7 @@ are filled to an entire word with zeros 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 -@code{(plus:SI (reg:QI 34) (reg:SI 80))} because the @samp{plus} +@code{(plus:SI (reg:QI 34) (reg:SI 80))} because the @code{plus} operation requires two operands of the same machine mode. Therefore, the byte-sized operand is enclosed in a conversion operation, as in @@ -4570,10 +4960,10 @@ but rather state assertions about their @table @code @item (strict_low_part (subreg:@var{m} (reg:@var{n} @var{r}) 0)) This expression code is used in only one context: operand 0 of a -@samp{set} expression. In addition, the operand of this expression -must be a @samp{subreg} expression. +@code{set} expression. In addition, the operand of this expression +must be a @code{subreg} expression. -The presence of @samp{strict_low_part} says that the part of the +The presence of @code{strict_low_part} says that the part of the register which is meaningful in mode @var{n}, but is not part of mode @var{m}, is not to be altered. Normally, an assignment to such a subreg is allowed to have undefined effects on the rest of the @@ -4596,23 +4986,23 @@ the operands of these. @item (set @var{lval} @var{x}) Represents the action of storing the value of @var{x} into the place represented by @var{lval}. @var{lval} must be an expression -representing a place that can be stored in: @samp{reg} (or -@samp{subreg} or @samp{strict_low_part}), @samp{mem}, @samp{pc} or -@samp{cc0}.@refill +representing a place that can be stored in: @code{reg} (or +@code{subreg} or @code{strict_low_part}), @code{mem}, @code{pc} or +@code{cc0}.@refill -If @var{lval} is a @samp{reg}, @samp{subreg} or @samp{mem}, it has a +If @var{lval} is a @code{reg}, @code{subreg} or @code{mem}, it has a machine mode; then @var{x} must be valid for that mode.@refill -If @var{lval} is a @samp{reg} whose machine mode is less than the full +If @var{lval} is a @code{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 -@var{lval} is a @samp{subreg} whose machine mode is narrower than +@var{lval} is a @code{subreg} whose machine mode is narrower than @code{SImode}, the rest of the register can be changed in an undefined way. -If @var{lval} is a @samp{strict_low_part} of a @samp{subreg}, then the +If @var{lval} is a @code{strict_low_part} of a @code{subreg}, then the part of the register specified by the machine mode of the -@samp{subreg} is given the value @var{x} and the rest of the register +@code{subreg} is given the value @var{x} and the rest of the register is not changed.@refill If @var{lval} is @code{(cc0)}, it has no machine mode, and @var{x} may @@ -4620,13 +5010,13 @@ have any mode. This represents a ``test If @var{lval} is @code{(pc)}, we have a jump instruction, and the possibilities for @var{x} are very limited. It may be a -@samp{label_ref} expression (unconditional jump). It may be an -@samp{if_then_else} (conditional jump), in which case either the +@code{label_ref} expression (unconditional jump). It may be an +@code{if_then_else} (conditional jump), in which case either the second or the third operand must be @code{(pc)} (for the case which -does not jump) and the other of the two must be a @samp{label_ref} -(for the case which does jump). @var{x} may also be a @samp{mem} or -@code{(plus:SI (pc) @var{y})}, where @var{y} may be a @samp{reg} or a -@samp{mem}; these unusual patterns are used to represent jumps through +does not jump) and the other of the two must be a @code{label_ref} +(for the case which does jump). @var{x} may also be a @code{mem} or +@code{(plus:SI (pc) @var{y})}, where @var{y} may be a @code{reg} or a +@code{mem}; these unusual patterns are used to represent jumps through branch tables.@refill @item (return) @@ -4634,11 +5024,11 @@ Represents a return from the current fun 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 @samp{return} expression code is never +precedes the epilogue, and the @code{return} expression code is never used. @item (call @var{function} @var{nargs}) -Represents a function call. @var{function} is a @samp{mem} expression +Represents a function call. @var{function} is a @code{mem} expression whose address is the address of the function to be called. @var{nargs} is an expression which can be used for two purposes: on some machines it represents the number of bytes of stack argument; on @@ -4653,8 +5043,8 @@ addressed. @item (clobber @var{x}) Represents the storing or possible storing of an unpredictable, -undescribed value into @var{x}, which must be a @samp{reg} or -@samp{mem} expression. +undescribed value into @var{x}, which must be a @code{reg} or +@code{mem} expression. One place this is used is in string instructions that store standard values into particular hard registers. It may not be worth the @@ -4669,12 +5059,12 @@ locations must be presumed clobbered. Note that the machine description classifies certain hard registers as ``call-clobbered''. All function call instructions are assumed by default to clobber these registers, so there is no need to use -@samp{clobber} expressions to indicate this fact. Also, each function +@code{clobber} expressions to indicate this fact. Also, each function call is assumed to have the potential to alter any memory location, unless the function is declared @code{const}. -When a @samp{clobber} expression for a register appears inside a -@samp{parallel} with other side effects, GNU CC guarantees that the +When a @code{clobber} expression for a register appears inside a +@code{parallel} with other side effects, GNU CC guarantees that the register is unoccupied both before and after that insn. Therefore, it is safe for the assembler code produced by the insn to use the register as a temporary. You can clobber either a specific hard @@ -4682,19 +5072,28 @@ register or a pseudo register; in the la allocate a hard register that is available there for use as a temporary. +If you clobber a pseudo register in this way, use a pseudo register +which appears nowhere else---generate a new one each time. Otherwise, +you may confuse CSE. + +There is one other known use for clobbering a pseudo register in a +@code{parallel}: when one of the input operands of the insn is also +clobbered by the insn. In this case, using the same pseudo register in +the clobber and elsewhere in the insn produces the expected results. + @item (use @var{x}) Represents the use of the value of @var{x}. It indicates that the value in @var{x} at this point in the program is needed, even though it may not be apparent why this is so. Therefore, the compiler will not attempt to delete previous instructions whose only effect is to -store a value in @var{x}. @var{x} must be a @samp{reg} expression. +store a value in @var{x}. @var{x} must be a @code{reg} expression. @item (parallel [@var{x0} @var{x1} @dots{}]) Represents several side effects performed in parallel. The square -brackets stand for a vector; the operand of @samp{parallel} is a +brackets stand for a vector; the operand of @code{parallel} is a vector of expressions. @var{x0}, @var{x1} and so on are individual -side effect expressions---expressions of code @samp{set}, @samp{call}, -@samp{return}, @samp{clobber} or @samp{use}.@refill +side effect expressions---expressions of code @code{set}, @code{call}, +@code{return}, @code{clobber} or @code{use}.@refill ``In parallel'' means that first all the values used in the individual side-effects are computed, and second all the actual side-effects are @@ -4711,8 +5110,8 @@ location addressed by it are interchange @code{(reg:SI 1)} appears as a memory address it refers to the value in register 1 @emph{before} the execution of the insn. -It follows that it is @emph{incorrect} to use @samp{parallel} and -expect the result of one @samp{set} to be available for the next one. +It follows that it is @emph{incorrect} to use @code{parallel} and +expect the result of one @code{set} to be available for the next one. For example, people sometimes attempt to represent a jump-if-zero instruction this way: @@ -4730,9 +5129,9 @@ on the condition code value @emph{before new value that is set by this instruction. Peephole optimization, which takes place in together with final assembly -code output, can produce insns whose patterns consist of a @samp{parallel} +code output, can produce insns whose patterns consist of a @code{parallel} whose elements are the operands needed to output the resulting -assembler code--often @samp{reg}, @samp{mem} or constant expressions. +assembler code---often @code{reg}, @code{mem} or constant expressions. This would not be well-formed RTL at any other stage in compilation, but it is ok then because no further optimization remains to be done. However, the definition of the macro @code{NOTICE_UPDATE_CC} must @@ -4741,14 +5140,14 @@ deal with such insns if you define any p @item (sequence [@var{insns} @dots{}]) Represents a sequence of insns. Each of the @var{insns} that appears in the vector is suitable for appearing in the chain of insns, so it -must be an @samp{insn}, @samp{jump_insn}, @samp{call_insn}, -@samp{code_label}, @samp{barrier} or @samp{note}. +must be an @code{insn}, @code{jump_insn}, @code{call_insn}, +@code{code_label}, @code{barrier} or @code{note}. -A @samp{sequence} RTX never appears in an actual insn. It represents -the sequence of insns that result from a @samp{define_expand} +A @code{sequence} RTX never appears in an actual insn. It represents +the sequence of insns that result from a @code{define_expand} @emph{before} those insns are passed to @code{emit_insn} to insert them in the chain of insns. When actually inserted, the individual -sub-insns are separated out and the @samp{sequence} is forgotten. +sub-insns are separated out and the @code{sequence} is forgotten. @end table Three expression codes appear in place of a side effect, as the body of an @@ -4760,13 +5159,13 @@ Represents literal assembler code as des @item (addr_vec:@var{m} [@var{lr0} @var{lr1} @dots{}]) Represents a table of jump addresses. The vector elements @var{lr0}, -etc., are @samp{label_ref} expressions. The mode @var{m} specifies +etc., are @code{label_ref} expressions. The mode @var{m} specifies how much space is given to each address; normally @var{m} would be @code{Pmode}. @item (addr_diff_vec:@var{m} @var{base} [@var{lr0} @var{lr1} @dots{}]) Represents a table of jump addresses expressed as offsets from -@var{base}. The vector elements @var{lr0}, etc., are @samp{label_ref} +@var{base}. The vector elements @var{lr0}, etc., are @code{label_ref} expressions and so is @var{base}. The mode @var{m} specifies how much space is given to each address-difference.@refill @end table @@ -4780,8 +5179,8 @@ Four special side-effect expression code @item (pre_dec:@var{m} @var{x}) Represents the side effect of decrementing @var{x} by a standard amount and represents also the value that @var{x} has after being -decremented. @var{x} must be a @samp{reg} or @samp{mem}, but most -machines allow only a @samp{reg}. @var{m} must be the machine mode +decremented. @var{x} must be a @code{reg} or @code{mem}, but most +machines allow only a @code{reg}. @var{m} must be the machine mode for pointers on the machine in use. The amount @var{x} is decremented by is the length in bytes of the machine mode of the containing memory reference of which this expression serves as the address. Here is an @@ -4799,7 +5198,7 @@ value and use the result to address a @c Similar, but specifies incrementing @var{x} instead of decrementing it. @item (post_dec:@var{m} @var{x}) -Represents the same side effect as @samp{pre_decrement} but a different +Represents the same side effect as @code{pre_dec} but a different value. The value represented here is the value @var{x} has @i{before} being decremented. @@ -4820,8 +5219,8 @@ combination pass could move the popping the meaning of the code. An instruction that can be represented with an embedded side effect -could also be represented using @samp{parallel} containing an additional -@samp{set} to describe how the address register is altered. This is not +could also be represented using @code{parallel} containing an additional +@code{set} to describe how the address register is altered. This is not done because machines that allow these operations at all typically allow them wherever a memory address is called for. Describing them as additional parallel stores would require doubling the number of entries @@ -4830,7 +5229,7 @@ in the machine description. @node Assembler, Insns, IncDec, RTL @section Assembler Instructions as Expressions -The RTX code @samp{asm_operands} represents a value produced by a +The RTX code @code{asm_operands} represents a value produced by a user-specified assembler instruction. It is used to represent an @code{asm} statement with arguments. An @code{asm} statement with a single output operand, like this: @@ -4840,7 +5239,7 @@ asm ("foo %1,%2,%0" : "=a" (outputvar) : @end example @noindent -is represented using a single @samp{asm_operands} RTX which represents +is represented using a single @code{asm_operands} RTX which represents the value that is stored in @code{outputvar}: @example @@ -4852,7 +5251,7 @@ the value that is stored in @code{output @end example @noindent -Here the operands of the @samp{asm_operands} RTX are the assembler +Here the operands of the @code{asm_operands} RTX are the assembler template string, the output-operand's constraint, the index-number of the output operand among the output operands specified, a vector of input operand RTX's, and a vector of input-operand modes and constraints. The @@ -4860,8 +5259,8 @@ mode @var{m1} is the mode of the sum @co @code{*z}. When an @code{asm} statement has multiple output values, its insn has -several such @samp{set} RTX's inside of a @samp{parallel}. Each @samp{set} -contains a @samp{asm_operands}; all of these share the same assembler +several such @code{set} RTX's inside of a @code{parallel}. Each @code{set} +contains a @code{asm_operands}; all of these share the same assembler template and vectors, but each contains the constraint for the respective output operand. They are also distinguished by the output-operand index number, which is 0, 1, @dots{} for successive output operands. @@ -4908,30 +5307,30 @@ is always true. Every insn has one of the following six expression codes: -@table @samp +@table @code @item insn -The expression code @samp{insn} is used for instructions that do not jump -and do not do function calls. Insns with code @samp{insn} have four +The expression code @code{insn} is used for instructions that do not jump +and do not do function calls. Insns with code @code{insn} have four additional fields beyond the three mandatory ones listed above. These four are described in a table below. @item jump_insn -The expression code @samp{jump_insn} is used for instructions that may jump -(or, more generally, may contain @samp{label_ref} expressions). -@samp{jump_insn} insns have the same extra fields as @samp{insn} insns, +The expression code @code{jump_insn} is used for instructions that may jump +(or, more generally, may contain @code{label_ref} expressions). +@code{jump_insn} insns have the same extra fields as @code{insn} insns, accessed in the same way. @item call_insn -The expression code @samp{call_insn} is used for instructions that may do +The expression code @code{call_insn} is used for instructions that may do function calls. It is important to distinguish these instructions because they imply that certain registers and memory locations may be altered unpredictably. -@samp{call_insn} insns have the same extra fields as @samp{insn} insns, +@code{call_insn} insns have the same extra fields as @code{insn} insns, accessed in the same way. @item code_label -A @samp{code_label} insn represents a label that a jump insn can jump to. +A @code{code_label} insn represents a label that a jump insn can jump to. It contains one special field of data in addition to the three standard ones. It is used to hold the @dfn{label number}, a number that identifies this label uniquely among all the labels in the compilation (not just in the @@ -4944,7 +5343,7 @@ jump instructions to indicate that the j They contain no information beyond the three standard fields. @item note -@samp{note} insns are used to represent additional debugging and +@code{note} insns are used to represent additional debugging and declarative information. They contain two nonstandard fields, an integer which is accessed with the macro @code{NOTE_LINE_NUMBER} and a string accessed with @code{NOTE_SOURCE_FILE}. @@ -4992,8 +5391,8 @@ These codes are printed symbolically whe The machine mode of an insn is normally zero (@code{VOIDmode}), but the reload pass sets it to @code{QImode} if the insn needs reloading. -Here is a table of the extra fields of @samp{insn}, @samp{jump_insn} -and @samp{call_insn} insns: +Here is a table of the extra fields of @code{insn}, @code{jump_insn} +and @code{call_insn} insns: @table @code @item PATTERN (@var{i}) @@ -5004,36 +5403,36 @@ An integer that says which pattern in th this insn, or -1 if the matching has not yet been attempted. Such matching is never attempted and this field is not used on an insn -whose pattern consists of a single @samp{use}, @samp{clobber}, -@samp{asm}, @samp{addr_vec} or @samp{addr_diff_vec} expression. +whose pattern consists of a single @code{use}, @code{clobber}, +@code{asm}, @code{addr_vec} or @code{addr_diff_vec} expression. @item LOG_LINKS (@var{i}) -A list (chain of @samp{insn_list} expressions) of previous ``related'' +A list (chain of @code{insn_list} expressions) of previous ``related'' insns: insns which store into registers values that are used for the first time in this insn. (An additional constraint is that neither a jump nor a label may come between the related insns). This list is set up by the flow analysis pass; it is a null pointer until then. @item REG_NOTES (@var{i}) -A list (chain of @samp{expr_list} expressions) giving information +A list (chain of @code{expr_list} expressions) giving information about the usage of registers in this insn. This list is set up by the flow analysis pass; it is a null pointer until then. @end table -The @code{LOG_LINKS} field of an insn is a chain of @samp{insn_list} +The @code{LOG_LINKS} field of an insn is a chain of @code{insn_list} expressions. Each of these has two operands: the first is an insn, -and the second is another @samp{insn_list} expression (the next one in -the chain). The last @samp{insn_list} in the chain has a null pointer +and the second is another @code{insn_list} expression (the next one in +the chain). The last @code{insn_list} in the chain has a null pointer as second operand. The significant thing about the chain is which -insns appear in it (as first operands of @samp{insn_list} +insns appear in it (as first operands of @code{insn_list} expressions). Their order is not significant. The @code{REG_NOTES} field of an insn is a similar chain but of -@samp{expr_list} expressions instead of @samp{insn_list}. There are +@code{expr_list} expressions instead of @code{insn_list}. There are several kinds of register notes, which are distinguished by the machine -mode of the @samp{expr_list}, which in a register note is really +mode of the @code{expr_list}, which in a register note is really understood as being an @code{enum reg_note}. The first operand @var{op} -of the @samp{expr_list} is data whose meaning depends on the kind of +of the @code{expr_list} is data whose meaning depends on the kind of note. Here are the kinds of register note: @table @code @@ -5045,8 +5444,8 @@ of the program. @item REG_INC The register @var{op} is incremented (or decremented; at this level there is no distinction) by an embedded side effect inside this insn. -This means it appears in a @code{POST_INC}, @code{PRE_INC}, -@code{POST_DEC} or @code{PRE_DEC} RTX. +This means it appears in a @code{post_inc}, @code{pre_inc}, +@code{post_dec} or @code{pre_dec} RTX. @item REG_EQUIV The register that is set by this insn will be equal to @var{op} at run @@ -5101,23 +5500,23 @@ The register @var{op} is known to have n insn is reached. @end table -For convenience, the machine mode in an @samp{insn_list} or -@samp{expr_list} is printed using these symbolic codes in debugging dumps. +For convenience, the machine mode in an @code{insn_list} or +@code{expr_list} is printed using these symbolic codes in debugging dumps. -The only difference between the expression codes @samp{insn_list} and -@samp{expr_list} is that the first operand of an @samp{insn_list} is +The only difference between the expression codes @code{insn_list} and +@code{expr_list} is that the first operand of an @code{insn_list} is assumed to be an insn and is printed in debugging dumps as the insn's -unique id; the first operand of an @samp{expr_list} is printed in the +unique id; the first operand of an @code{expr_list} is printed in the ordinary way as an expression. @node Calls, Sharing, Insns, RTL @section RTL Representation of Function-Call Insns -Insns that call subroutines have the RTL expression code @samp{call_insn}. +Insns that call subroutines have the RTL expression code @code{call_insn}. These insns must satisfy special rules, and their bodies must use a special -RTL expression code, @samp{call}. +RTL expression code, @code{call}. -A @samp{call} expression has two operands, as follows: +A @code{call} expression has two operands, as follows: @example (call (mem:@var{fm} @var{addr}) @var{nbytes}) @@ -5130,7 +5529,7 @@ argument data being passed to the subrou the machine description) and @var{addr} represents the address of the subroutine. -For a subroutine that returns no value, the @samp{call} RTX as shown above +For a subroutine that returns no value, the @code{call} RTX as shown above is the entire body of the insn. For a subroutine that returns a value whose mode is not @code{BLKmode}, @@ -5168,7 +5567,7 @@ value the call produced, and no operatio @noindent Between the call insn and this following insn there may intervene only a -stack-adjustment insn (and perhaps some @samp{note} insns). +stack-adjustment insn (and perhaps some @code{note} insns). When a subroutine returns a @code{BLKmode} value, it is handled by passing to the subroutine the address of a place to store the value. @@ -5190,36 +5589,36 @@ no RTL objects are common to two functio @itemize @bullet @item -Each pseudo-register has only a single @samp{reg} object to represent it, +Each pseudo-register has only a single @code{reg} object to represent it, and therefore only a single machine mode. @item -For any symbolic label, there is only one @samp{symbol_ref} object +For any symbolic label, there is only one @code{symbol_ref} object referring to it. @item -There is only one @samp{const_int} expression with value zero, +There is only one @code{const_int} expression with value zero, and only one with value one. @item -There is only one @samp{pc} expression. +There is only one @code{pc} expression. @item -There is only one @samp{cc0} expression. +There is only one @code{cc0} expression. @item -There is only one @samp{const_double} expression with mode +There is only one @code{const_double} expression with mode @code{SFmode} and value zero, and only one with mode @code{DFmode} and value zero. @item -No @samp{label_ref} appears in more than one place in the RTL +No @code{label_ref} appears in more than one place in the RTL structure; in other words, it is safe to do a tree-walk of all the -insns in the function and assume that each time a @samp{label_ref} is +insns in the function and assume that each time a @code{label_ref} is seen it is distinct from all others that are seen. @item -Only one @samp{mem} object is normally created for each static +Only one @code{mem} object is normally created for each static variable or stack slot, so these objects are frequently shared in all the places they appear. However, separate but equal objects for these variables are occasionally made. @@ -5248,7 +5647,7 @@ after which the above rules are guarante During the combiner pass, shared structure with an insn can exist temporarily. However, the shared structure is copied before the combiner is finished with the insn. This is done by -@code{copy_substitutions} in @samp{combine.c}. +@code{copy_substitutions} in @file{combine.c}. @end itemize @node Machine Desc, Machine Macros, RTL, Top @@ -5267,7 +5666,7 @@ See the next chapter for information on @menu * Patterns:: How to write instruction patterns. -* Example:: An explained example of a @samp{define_insn} pattern. +* Example:: An explained example of a @code{define_insn} pattern. * RTL Template:: The RTL template defines what insns match a pattern. * Output Template:: The output template says how to make assembler code from such an insn. @@ -5289,9 +5688,9 @@ See the next chapter for information on Each instruction pattern contains an incomplete RTL expression, with pieces to be filled in later, operand constraints that restrict how the pieces can be filled in, and an output pattern or C code to generate the assembler -output, all wrapped up in a @samp{define_insn} expression. +output, all wrapped up in a @code{define_insn} expression. -A @samp{define_insn} is an RTL expression containing four or five operands: +A @code{define_insn} is an RTL expression containing four or five operands: @enumerate @item @@ -5312,13 +5711,13 @@ effect; they are equivalent to no name a @item The @dfn{RTL template} (@pxref{RTL Template}) is a vector of incomplete RTL expressions which show what the instruction should look -like. It is incomplete because it may contain @samp{match_operand} -and @samp{match_dup} expressions that stand for operands of the +like. It is incomplete because it may contain @code{match_operand} +and @code{match_dup} expressions that stand for operands of the instruction. If the vector has only one element, that element is what the instruction should look like. If the vector has multiple elements, -then the instruction looks like a @samp{parallel} expression +then the instruction looks like a @code{parallel} expression containing that many elements as described. @item @@ -5356,7 +5755,7 @@ whose definition is up to you (@pxref{Mi @end enumerate @node Example, RTL Template, Patterns, Machine Desc -@section Example of @samp{define_insn} +@section Example of @code{define_insn} Here is an actual example of an instruction pattern, for the 68000/68020. @@ -5398,41 +5797,48 @@ controlled by special expression types t substitution of the operands. @table @code -@item (match_operand:@var{m} @var{n} @var{testfn} @var{constraint}) +@item (match_operand:@var{m} @var{n} @var{pred} @var{constraint}) This expression is a placeholder for operand number @var{n} of the insn. When constructing an insn, operand number @var{n} will be substituted at this point. When matching an insn, whatever appears at this position in the insn will be taken as operand -number @var{n}; but it must satisfy @var{testfn} or this instruction +number @var{n}; but it must satisfy @var{pred} or this instruction pattern will not match at all. Operand numbers must be chosen consecutively counting from zero in -each instruction pattern. There may be only one @samp{match_operand} +each instruction pattern. There may be only one @code{match_operand} expression in the pattern for each operand number. Usually operands -are numbered in the order of appearance in @samp{match_operand} +are numbered in the order of appearance in @code{match_operand} expressions. -@var{testfn} is a string that is the name of a C function that accepts -two arguments, a machine mode and an expression. During matching, -the function will be called with @var{m} as the mode argument -and the putative operand as the other argument. If it returns zero, -this instruction pattern fails to match. @var{testfn} may be -an empty string; then it means no test is to be done on the operand. - -@var{constraint} is explained later (@pxref{Constraints}). - -Most often, @var{testfn} is @code{"general_operand"}. It checks -that the putative operand is either a constant, a register or a -memory reference, and that it is valid for mode @var{m}. +@var{pred} is a string that is the name of a C function that accepts +two arguments, an expression and a machine mode. During matching, the +function will be called with the putative operand as the expression +and @var{m} as the mode argument. If it returns zero, this +instruction pattern fails to match. @var{pred} may be an empty +string; then it means no test is to be done on the operand, +so anything which occurs in this position is valid. + +@var{constraint} controls reloading and the choice of the best register +class to use for a value, as explained later (@pxref{Constraints}). + +People are often unclear on the difference between the constraint and the +predicate. The predicate helps decide whether a given insn matches the +pattern. The constraint plays no role in this decision; instead, it +controls various decisions in the case of an insn which does match. + +Most often, @var{pred} is @code{"general_operand"}. This function checks +that the putative operand is either a constant, a register or a memory +reference, and that it is valid for mode @var{m}. -For an operand that must be a register, @var{testfn} should be +For an operand that must be a register, @var{pred} should be @code{"register_operand"}. It would be valid to use @code{"general_operand"}, since the reload pass would copy any non-register operands through registers, but this would make GNU CC do extra work, and it would prevent the register allocator from doing the best possible job. -For an operand that must be a constant, either @var{testfn} should be +For an operand that must be a constant, either @var{pred} should be @code{"immediate_operand"}, or the instruction pattern's extra condition should check for constants, or both. You cannot expect the constraints to do this work! If the constraints allow only constants, @@ -5444,11 +5850,11 @@ This expression is also a placeholder fo It is used when the operand needs to appear more than once in the insn. -In construction, @samp{match_dup} behaves exactly like -@samp{match_operand}: the operand is substituted into the insn being -constructed. But in matching, @samp{match_dup} behaves differently. +In construction, @code{match_dup} behaves exactly like +@code{match_operand}: the operand is substituted into the insn being +constructed. But in matching, @code{match_dup} behaves differently. It assumes that operand number @var{n} has already been determined by -a @samp{match_operand} appearing earlier in the recognition template, +a @code{match_operand} appearing earlier in the recognition template, and it matches only an identical-looking expression. @item (match_operator:@var{m} @var{n} "@var{predicate}" [@var{operands}@dots{}]) @@ -5495,12 +5901,12 @@ because the expressions to be matched al When this pattern does match, the two operands of the commutative operator are recorded as operands 3 and 4 of the insn. (This is done -by the two instances of @samp{match_operand}.) Operand 2 of the insn +by the two instances of @code{match_operand}.) Operand 2 of the insn will be the entire commutative expression: use @code{GET_CODE (operands[2])} to see which commutative operator was used. -The machine mode @var{m} of @samp{match_operator} works like that of -@samp{match_operand}: it is passed as the second argument to the +The machine mode @var{m} of @code{match_operator} works like that of +@code{match_operand}: it is passed as the second argument to the predicate function, and that function is solely responsible for deciding whether the expression to be matched ``has'' that mode. @@ -5511,11 +5917,11 @@ into a new expression whose operands are gen-function. The subexpressions of argument 2 are not used; only its expression code matters. -There is no way to specify constraints in @samp{match_operator}. The -operand of the insn which corresponds to the @samp{match_operator} +There is no way to specify constraints in @code{match_operator}. The +operand of the insn which corresponds to the @code{match_operator} never has any constraints because it is never reloaded as a whole. However, if parts of its @var{operands} are matched by -@samp{match_operand} patterns, those parts may have constraints of +@code{match_operand} patterns, those parts may have constraints of their own. @item (address (match_operand:@var{m} @var{n} "address_operand" "")) @@ -5525,7 +5931,7 @@ a memory location in the usual way, but value used is the address of the location, not the contents of the location. -@samp{address} expressions never appear in RTL code, only in machine +@code{address} expressions never appear in RTL code, only in machine descriptions. And they are used only in machine descriptions that do not use the operand constraint feature. When operand constraints are in use, the letter @samp{p} in the constraint serves this purpose. @@ -5534,11 +5940,11 @@ in use, the letter @samp{p} in the const addressed}, not the machine mode of the address itself. That mode is always the same on a given target machine (it is @code{Pmode}, which normally is @code{SImode}), so there is no point in mentioning it; -thus, no machine mode is written in the @samp{address} expression. If +thus, no machine mode is written in the @code{address} expression. If some day support is added for machines in which addresses of different kinds of objects appear differently or are used differently (such as the PDP-10), different formats would perhaps need different machine -modes and these modes might be written in the @samp{address} +modes and these modes might be written in the @code{address} expression. @end table @@ -5579,7 +5985,9 @@ instruction. @samp{%} followed by a punctuation character specifies a substitution that does not use an operand. Only one case is standard: @samp{%%} outputs a @samp{%} into the assembler code. Other nonstandard cases can be -defined in the @code{PRINT_OPERAND} macro. +defined in the @code{PRINT_OPERAND} macro. You must also define +which punctuation characters are valid with the +@code{PRINT_OPERAND_PUNCT_VALID_P} macro. The template may generate multiple assembler instructions. Write the text for the instructions, with @samp{\;} between them. @@ -5651,7 +6059,7 @@ a pattern could use @code{which_alternat @node Constraints, Standard Names, Output Statement, Machine Desc @section Operand Constraints -Each @samp{match_operand} in an instruction pattern can specify a +Each @code{match_operand} in an instruction pattern can specify a constraint for the type of operands allowed. Constraints can say whether an operand may be in a register, and which kinds of register; whether the operand can be a memory reference, and which kinds of address; whether the @@ -5680,17 +6088,17 @@ supports in general. @item @samp{o} A memory operand is allowed, but only if the address is -@dfn{offsetable}. This means that adding a small integer (actually, +@dfn{offsettable}. This means that adding a small integer (actually, the width in bytes of the operand, as determined by its machine mode) may be added to the address and the result is also a valid memory address. -For example, an address which is constant is offsetable; so is an +For example, an address which is constant is offsettable; so is an address that is the sum of a register and a constant (as long as a slightly larger constant is also within the range of address-offsets supported by the machine); but an autoincrement or autodecrement -address is not offsetable. More complicated indirect/indexed -addresses may or may not be offsetable depending on the other +address is not offsettable. More complicated indirect/indexed +addresses may or may not be offsettable depending on the other addressing modes that the machine supports. Note that in an output operand which can be matched by another @@ -5699,9 +6107,9 @@ by both @samp{<} (if the target machine and @samp{>} (if the target machine has preincrement addressing). When the constraint letter @samp{o} is used, the reload pass may -generate instructions which copy a nonoffsetable address into an index +generate instructions which copy a nonoffsettable address into an index register. The idea is that the register can be used as a replacement -offsetable address. But this method requires that there be patterns +offsettable address. But this method requires that there be patterns to copy any kind of address into a register. Auto-increment and auto-decrement addresses are an exception; there need not be an instruction that can copy such an address into a register, because @@ -5750,7 +6158,7 @@ This is the range permitted as a shift c instructions. @item @samp{F} -An immediate floating operand (expression code @samp{const_double}) is +An immediate floating operand (expression code @code{const_double}) is allowed. @item @samp{G}, @samp{H} @@ -5807,8 +6215,8 @@ use the output-operand's number when pri An operand that is a valid memory address is allowed. This is for ``load address'' and ``push address'' instructions. -If @samp{p} is used in the constraint, the test-function in the -@samp{match_operand} must be @code{address_operand}. +@samp{p} in the constraint must be accompanies by @code{address_operand} +as the predicate in the @code{match_operand}. @end table In order to have valid assembler code, each operand must satisfy @@ -5902,14 +6310,15 @@ compiler knows how to copy a register in proper class in order to make an instruction valid. @item -A nonoffsetable memory reference can be reloaded by copying the +A nonoffsettable memory reference can be reloaded by copying the address into a register. So if the constraint uses the letter @samp{o}, all memory references are taken care of. @item -A constant operand can be reloaded by storing it in memory; it then -becomes an offsetable memory reference. So if the constraint uses the -letters @samp{o} or @samp{m}, constant operands are not a problem. +A constant operand can be reloaded by allocating space in memory to +hold it as preinitialized data. Then the memory reference can be used +in place of the constant. So if the constraint uses the letters +@samp{o} or @samp{m}, constant operands are not a problem. @end itemize If the operand's predicate can recognize registers, but the constraint does @@ -6095,9 +6504,9 @@ refer to its address. They would have c For such machines, instead of writing @samp{g} and @samp{p} for all the constraints, you can choose to write a description with empty constraints. -Then you write @samp{""} for the constraint in every @samp{match_operand}. -Address operands are identified by writing an @samp{address} expression -around the @samp{match_operand}, not by their constraints. +Then you write @samp{""} for the constraint in every @code{match_operand}. +Address operands are identified by writing an @code{address} expression +around the @code{match_operand}, not by their constraints. When the machine description has just empty constraints, certain parts of compilation are skipped, making the compiler faster. However, @@ -6114,12 +6523,12 @@ pattern in to accomplish a certain task. @table @asis @item @samp{mov@var{m}} -Here @var{m} is a two-letter machine mode name, in lower case. This -instruction pattern moves data with that machine mode from operand 1 to -operand 0. For example, @samp{movsi} moves full-word data. +Here @var{m} stands for a two-letter machine mode name, in lower case. +This instruction pattern moves data with that machine mode from operand +1 to operand 0. For example, @samp{movsi} moves full-word data. -If operand 0 is a @samp{subreg} with mode @var{m} of a register whose -natural mode is wider than @var{m}, the effect of this instruction is +If operand 0 is a @code{subreg} with mode @var{m} of a register whose +own mode is wider than @var{m}, the effect of this instruction is to store the specified value in the part of the register that corresponds to mode @var{m}. The effect on the rest of the register is undefined. @@ -6129,20 +6538,21 @@ to copy a datum from one place to anothe Second, these patterns are not used solely in the RTL generation pass. Even the reload pass can generate move insns to copy values from stack -slots into temporary registers. When it does so, one of the operands -is a hard register and the other is an operand that can have a reload. - -Therefore, when given such a pair of operands, the pattern must -generate RTL which needs no temporary registers---no registers other -than the operands. For example, if you support the pattern with a -@code{define_expand}, then in such a case you mustn't call -@code{force_reg} or any other such function which might generate new -pseudo registers. +slots into temporary registers. When it does so, one of the operands is +a hard register and the other is an operand that can need to be reloaded +into a register. + +Therefore, when given such a pair of operands, the pattern must generate +RTL which needs no reloading and needs no temporary registers---no +registers other than the operands. For example, if you support the +pattern with a @code{define_expand}, then in such a case the +@code{define_expand} mustn't call @code{force_reg} or any other such +function which might generate new pseudo registers. This requirement exists even for subword modes on a RISC machine where fetching those modes from memory normally requires several insns and some temporary registers. Look in @file{spur.md} to see how the -requirement is satisfied. +requirement can be satisfied. The variety of operands that have reloads depends on the rest of the machine description, but typically on a RISC machine these can only be @@ -6154,7 +6564,7 @@ to any other hard register (provided tha permits mode @var{m} in each of the registers). @item @samp{movstrict@var{m}} -Like @samp{mov@var{m}} except that if operand 0 is a @samp{subreg} +Like @samp{mov@var{m}} except that if operand 0 is a @code{subreg} with mode @var{m} of a register whose natural mode is wider, the @samp{movstrict@var{m}} instruction is guaranteed not to alter any of the register except the part which belongs to mode @var{m}. @@ -6349,26 +6759,27 @@ for operands 1 and 2. Store zero or nonzero in the operand according to the condition codes. Value stored is nonzero iff the condition @var{cond} is true. @var{cond} is the name of a comparison operation expression code, such -as @samp{eq}, @samp{lt} or @samp{leu}. +as @code{eq}, @code{lt} or @code{leu}. You specify the mode that the operand must have when you write the @code{match_operand} expression. The compiler automatically sees which mode you have used and supplies an operand of that mode. -The value stored for a true condition must have 1 as its low bit. -Otherwise the instruction is not suitable and must be omitted from the -machine description. You must tell the compiler exactly which value -is stored by defining the macro @code{STORE_FLAG_VALUE}. +The value stored for a true condition must have 1 as its low bit, or +else must be negative. Otherwise the instruction is not suitable and +must be omitted from the machine description. You must tell the +compiler exactly which value is stored by defining the macro +@code{STORE_FLAG_VALUE}. @item @samp{b@var{cond}} -Conditional branch instruction. Operand 0 is a @samp{label_ref} +Conditional branch instruction. Operand 0 is a @code{label_ref} that refers to the label to jump to. Jump if the condition codes meet condition @var{cond}. @item @samp{call} Subroutine call instruction returning no value. Operand 0 is the function to call; operand 1 is the number of bytes of arguments pushed -(in mode @code{SImode}, except it is normally a @samp{const_int}); +(in mode @code{SImode}, except it is normally a @code{const_int}); operand 2 is the number of registers used as operands. On most machines, operand 2 is not actually stored into the RTL @@ -6376,7 +6787,7 @@ pattern. It is supplied for the sake of to put this information into the assembler code; they can put it in the RTL instead of operand 1. -Operand 0 should be a @samp{mem} RTX whose address is the address of +Operand 0 should be a @code{mem} RTX whose address is the address of the function. @item @samp{call_value} @@ -6393,6 +6804,11 @@ Subroutine return instruction. This ins defined only if a single instruction can do all the work of returning from a function. +@item @samp{nop} +No-op instruction. This instruction pattern name should always be defined +to output a no-op in assembler code. @code{(const_int 0)} will do as an +RTL pattern. + @item @samp{casesi} Instruction to jump through a dispatch table, including bounds checking. This instruction takes five operands: @@ -6420,8 +6836,8 @@ but it is always provided as an operand. A label that precedes the table itself. @end enumerate -The table is a @samp{addr_vec} or @samp{addr_diff_vec} inside of a -@samp{jump_insn}. The number of elements in the table is one plus the +The table is a @code{addr_vec} or @code{addr_diff_vec} inside of a +@code{jump_insn}. The number of elements in the table is one plus the difference between the upper bound and the lower bound. @item @samp{tablejump} @@ -6589,9 +7005,9 @@ optimized away, but they do occasionally compilations. When an instruction has the constraint letter @samp{o}, the reload -pass may generate instructions which copy a nonoffsetable address into +pass may generate instructions which copy a nonoffsettable address into an index register. The idea is that the register can be used as a -replacement offsetable address. In order for these generated +replacement offsettable address. In order for these generated instructions to work, there must be patterns to copy any kind of valid address into a register. @@ -6673,20 +7089,19 @@ A definition looks like this: @noindent The last string operand may be omitted if you are not using any machine-specific information in this machine description. If present, -it must obey the same rules as in a @samp{define_insn}. +it must obey the same rules as in a @code{define_insn}. In this skeleton, @var{insn-pattern-1} and so on are patterns to match consecutive insns. The optimization applies to a sequence of insns when @var{insn-pattern-1} matches the first one, @var{insn-pattern-2} matches the next, and so on.@refill -@var{insn-pattern-1} and so on look @emph{almost} like the second operand -of @code{define_insn}. There is one important difference: this pattern is -an RTX, not a vector. If the @code{define_insn} pattern would be a vector -of one element, the @var{insn-pattern} should be just that element, no -vector. If the @code{define_insn} pattern would have multiple elements -then the @var{insn-pattern} must place the vector inside an explicit -@code{parallel} RTX.@refill +Each of the insns matched by a peephole must also match a +@code{define_insn}. Peepholes are checked only at the last stage just +before code generation, and only optionally. Therefore, any insn which +would match a peephole but no @code{define_insn} will cause a crash in code +generation in an unoptimized compilation, or at various optimization +stages. The operands of the insns are matched with @code{match_operands} and @code{match_dup}, as usual. What is not usual is that the operand numbers @@ -6695,10 +7110,14 @@ identical operands in two insns by using and @code{match_dup} in the other. The operand constraints used in @code{match_operand} patterns do not have -any direct effect on the applicability of the optimization, but they will -be validated afterward, so write constraints that are sure to fit whenever -the optimization is applied. It is safe to use @code{"g"} for each -operand. +any direct effect on the applicability of the peephole, but they will +be validated afterward, so make sure your constraints are general enough +to apply whenever the peephole matches. If the peephole matches +but the constraints are not satisfied, the compiler will crash. + +It is safe to omit constraints in all the operands of the peephole; or +you can write constraints which serve as a double-check on the criteria +previously tested. Once a sequence of insns matches the patterns, the @var{condition} is checked. This is a C expression which makes the final decision whether to @@ -6716,7 +7135,7 @@ The way to refer to the operands in @var @code{operands[@var{i}]} for operand number @var{i} (as matched by @code{(match_operand @var{i} @dots{})}). Use the variable @code{insn} to refer to the last of the insns being matched; use @code{PREV_INSN} to find -the preceding insns (but be careful to skip over any @samp{note} insns that +the preceding insns (but be careful to skip over any @code{note} insns that intervene).@refill When optimizing computations with intermediate results, you can use @@ -6798,28 +7217,65 @@ and in this C code check the condition c assembler code as appropriate. @end ignore +@var{insn-pattern-1} and so on look @emph{almost} like the second +operand of @code{define_insn}. There is one important difference: the +second operand of @code{define_insn} consists of one or more RTX's +enclosed in square brackets. Usually, there is only one: then the same +action can be written as an element of a @code{define_peephole}. But +when there are multiple actions in a @code{define_insn}, they are +implicitly enclosed in a @code{parallel}. Then you must explicitly +write the @code{parallel}, and the square brackets within it, in the +@code{define_peephole}. Thus, if an insn pattern looks like this, + +@example +(define_insn "divmodsi4" + [(set (match_operand:SI 0 "general_operand" "=d") + (div:SI (match_operand:SI 1 "general_operand" "0") + (match_operand:SI 2 "general_operand" "dmsK"))) + (set (match_operand:SI 3 "general_operand" "=d") + (mod:SI (match_dup 1) (match_dup 2)))] + "TARGET_68020" + "divsl%.l %2,%3:%0") +@end example + +@noindent +then the way to mention this insn in a peephole is as follows: + +@example +(define_peephole + [@dots{} + (parallel + [(set (match_operand:SI 0 "general_operand" "=d") + (div:SI (match_operand:SI 1 "general_operand" "0") + (match_operand:SI 2 "general_operand" "dmsK"))) + (set (match_operand:SI 3 "general_operand" "=d") + (mod:SI (match_dup 1) (match_dup 2)))]) + @dots{}] + @dots{}) +@end example + @node Expander Definitions,, Peephole Definitions, Machine Desc @section Defining RTL Sequences for Code Generation On some target machines, some standard pattern names for RTL generation cannot be handled with single insn, but a sequence of RTL insns can represent them. For these target machines, you can write a -@samp{define_expand} to specify how to generate the sequence of RTL. +@code{define_expand} to specify how to generate the sequence of RTL. -A @samp{define_expand} is an RTL expression that looks almost like a -@samp{define_insn}; but, unlike the latter, a @samp{define_expand} is used +A @code{define_expand} is an RTL expression that looks almost like a +@code{define_insn}; but, unlike the latter, a @code{define_expand} is used only for RTL generation and it can produce more than one RTL insn. -A @samp{define_expand} RTX has four operands: +A @code{define_expand} RTX has four operands: @itemize @bullet @item -The name. Each @samp{define_expand} must have a name, since the only +The name. Each @code{define_expand} must have a name, since the only use for it is to refer to it by name. @item The RTL template. This is just like the RTL template for a -@samp{define_peephole} in that it is a vector of RTL expressions +@code{define_peephole} in that it is a vector of RTL expressions each being one insn. @item @@ -6827,7 +7283,7 @@ The condition, a string containing a C e used to express how the availability of this pattern depends on subclasses of target machine, selected by command-line options when GNU CC is run. This is just like the condition of a -@samp{define_insn} that has a standard name. +@code{define_insn} that has a standard name. @item The preparation statements, a string containing zero or more C @@ -6836,31 +7292,36 @@ the RTL template. Usually these statements prepare temporary registers for use as internal operands in the RTL template, but they can also generate RTL -insns directly by calling routines such as @samp{emit_insn}, etc. +insns directly by calling routines such as @code{emit_insn}, etc. Any such insns precede the ones that come from the RTL template. @end itemize +Every RTL insn emitted by a @code{define_expand} must match some +@code{define_insn} in the machine description. Otherwise, the compiler +will crash when trying to generate code for the insn or trying to optimize +it. + The RTL template, in addition to controlling generation of RTL insns, also describes the operands that need to be specified when this pattern is used. In particular, it gives a predicate for each operand. A true operand, which need to be specified in order to generate RTL from -the pattern, should be described with a @samp{match_operand} in its first +the pattern, should be described with a @code{match_operand} in its first occurrence in the RTL template. This enters information on the operand's predicate into the tables that record such things. GNU CC uses the information to preload the operand into a register if that is required for valid RTL code. If the operand is referred to more than once, subsequent -references should use @samp{match_dup}. +references should use @code{match_dup}. The RTL template may also refer to internal ``operands'' which are temporary registers or labels used only within the sequence made by the -@samp{define_expand}. Internal operands are substituted into the RTL -template with @samp{match_dup}, never with @samp{match_operand}. The +@code{define_expand}. Internal operands are substituted into the RTL +template with @code{match_dup}, never with @code{match_operand}. The values of the internal operands are not passed in as arguments by the compiler when it requests use of this pattern. Instead, they are computed within the pattern, in the preparation statements. These statements compute the values and store them into the appropriate elements of -@code{operands} so that @samp{match_dup} can find them. +@code{operands} so that @code{match_dup} can find them. There are two special macros defined for use in the preparation statements: @code{DONE} and @code{FAIL}. Use them with a following semicolon, @@ -6902,16 +7363,16 @@ Here is an example, the definition of le @end example @noindent -This example uses @samp{define_expand} so that it can generate an RTL insn +This example uses @code{define_expand} so that it can generate an RTL insn for shifting when the shift-count is in the supported range of 0 to 3 but fail in other cases where machine insns aren't available. When it fails, the compiler tries another strategy using different patterns (such as, a library call). If the compiler were able to handle nontrivial condition-strings in -patterns with names, then there would be possible to use a -@samp{define_insn} in that case. Here is another case (zero-extension on -the 68000) which makes more use of the power of @samp{define_expand}: +patterns with names, then it would be possible to use a +@code{define_insn} in that case. Here is another case (zero-extension +on the 68000) which makes more use of the power of @code{define_expand}: @example (define_expand "zero_extendhisi2" @@ -6919,7 +7380,7 @@ the 68000) which makes more use of the p (const_int 0)) (set (strict_low_part (subreg:HI - (match_operand:SI 0 "general_operand" "") + (match_dup 0) 0)) (match_operand:HI 1 "general_operand" ""))] "" @@ -6936,11 +7397,11 @@ temporary register if it refers to @code by emitting another RTL insn. Finally, a third example shows the use of an internal operand. -Zero-extension on the SPUR chip is done by @samp{and}-ing the result +Zero-extension on the SPUR chip is done by @code{and}-ing the result against a halfword mask. But this mask cannot be represented by a -@samp{const_int} because the constant value is too large to be legitimate +@code{const_int} because the constant value is too large to be legitimate on this machine. So it must be copied into a register with -@code{force_reg} and then the register used in the @samp{and}. +@code{force_reg} and then the register used in the @code{and}. @example (define_expand "zero_extendhisi2" @@ -6955,6 +7416,11 @@ on this machine. So it must be copied i VOIDmode, 65535)); ") @end example +@strong{Note:} If the @code{define_expand} is used to serve a standard +binary or unary arithmetic operation, then the last insn it generates +must not be a @code{code_label}, @code{barrier} or @code{note}. It must +be an @code{insn}, @code{jump_insn} or @code{call_insn}. + @node Machine Macros, Config, Machine Desc, Top @chapter Machine Description Macros @@ -6971,6 +7437,7 @@ compiler source files include @file{conf * Stack Layout:: Defining which way the stack grows and by how much. * Library Names:: Specifying names of subroutines to call automatically. * Addressing Modes:: Defining addressing modes valid for memory operands. +* Delayed Branch:: Do branches execute the following instruction? * Condition Code:: Defining how insns update the condition code. * Assembler Format:: Defining how to write insns and pseudo-ops to output. * Cross-compilation:: Handling floating point for cross-compilers. @@ -6998,9 +7465,9 @@ For example, on the Sun, one can use the "-Dmc68000 -Dsun -Dunix" @end example -The result is to define the macros @samp{__mc68000__}, @samp{__sun__} -and @samp{__unix__} unconditionally, and the macros @samp{mc68000}, -@samp{sun} and @samp{unix} provided @samp{-ansi} is not specified. +The result is to define the macros @code{__mc68000__}, @code{__sun__} +and @code{__unix__} unconditionally, and the macros @code{mc68000}, +@code{sun} and @code{unix} provided @samp{-ansi} is not specified. @item CPP_SPEC A C string constant that tells the GNU CC driver program options to @@ -7089,6 +7556,9 @@ number. This means that bit-field instr significant bit. If the machine has no bit-field instructions, this macro is irrelevant. +This macro does not affect the way structure fields are packed into +bytes or words; that is controlled by @code{BYTES_BIG_ENDIAN}. + @item BYTES_BIG_ENDIAN Define this macro if the most significant byte in a word has the lowest number. @@ -7138,6 +7608,18 @@ Alignment required for a function entry @item BIGGEST_ALIGNMENT Biggest alignment that any data type can require on this machine, in bits. +@item CONSTANT_ALIGNMENT (@var{code}, @var{typealign}) +A C expression to compute the alignment for a constant. The argument +@var{typealign} is the alignment required for the constant's data type. +@var{code} is the tree code of the constant itself. + +If this macro is not defined, the default is to use @var{typealign}. If +you do define this macro, the value must be a multiple of +@var{typealign}. + +The purpose of defining this macro is usually to cause string constants +to be word aligned so that @file{dhrystone} can be made to run faster. + @item EMPTY_FIELD_BOUNDARY Alignment in bits to be given to a structure bit field that follows an empty field such as @code{int : 0;}. @@ -7226,7 +7708,7 @@ automatically saves it on function entry exit, if the register is used within the function. @item DEFAULT_CALLER_SAVES -Define this macro if the target machine if function calls do not preserve +Define this macro if function calls on the target machine do not preserve any registers; in other words, if @code{CALL_USED_REGISTERS} has 1 for all registers. This macro enables @samp{-fcaller-saves} by default. Eventually that option will be enabled by default on all machines and both @@ -7286,12 +7768,12 @@ optimizations that take place after regi invalidate the death notes are not done when this register is involved. -You would arrange to preserve death info for a register when some -of the code in the machine description which is executed to write -the assembler code looks at the the death notes. This is -necessary only when the actual hardware feature which GNU CC -thinks of as a register is not actually a register of the usual sort. -(It might, for example, be a hardware stack.) +You would arrange to preserve death info for a register when some of the +code in the machine description which is executed to write the assembler +code looks at the death notes. This is necessary only when the actual +hardware feature which GNU CC thinks of as a register is not actually a +register of the usual sort. (It might, for example, be a hardware +stack.) If this macro is not defined, it means that no death notes need to be preserved. This is the usual situation. @@ -7320,8 +7802,18 @@ are equivalent, a suitable definition is #define HARD_REGNO_MODE_OK(REGNO, MODE) 1 @end example -It is not necessary for this macro to check for fixed register numbers -because the allocation mechanism considers them to be always occupied. +It is not necessary for this macro to check for the numbers of fixed +registers, because the allocation mechanism considers them to be always +occupied. + +On some machines, double-precision values must be kept in even/odd +register pairs. The way to implement that is to define this macro +to reject odd register numbers for such modes. + +GNU CC assumes that it can always move values between registers and +(suitably addressed) memory locations. If it is impossible to move a +value of a certain mode between memory and certain registers, then +@code{HARD_REGNO_MODE_OK} must not allow this mode in those registers. Many machines have special registers for floating point arithmetic. Often people assume that floating point machine modes are allowed only @@ -7330,7 +7822,7 @@ can hold integers can safely @emph{hold} mode, whether or not floating arithmetic can be done on it in those registers. -The true significance of special floating registers is rather than +The true significance of special floating registers is rather that non-floating-point machine modes @emph{may not} go in those registers. This is true if the floating registers normalize any value stored in them, because storing a non-floating value there would garble it. If @@ -7347,8 +7839,8 @@ will not be used unless some insn's cons It is obligatory to support floating point `move' instructions into and out of any registers that can hold fixed point values, because -unions and structures (which have modes @samp{SImode} or -@samp{DImode}) can be in those registers and they may have floating +unions and structures (which have modes @code{SImode} or +@code{DImode}) can be in those registers and they may have floating point members. There may also be a need to support fixed point `move' instructions in @@ -7434,7 +7926,7 @@ should be the number of that register. @item STRUCT_VALUE If the structure value address is not passed in a register, define @code{STRUCT_VALUE} as an expression returning an RTX for the place -where the address is passed. If it returns a @samp{mem} RTX, the +where the address is passed. If it returns a @code{mem} RTX, the address is passed as an ``invisible'' first argument. @item STRUCT_VALUE_INCOMING_REGNUM @@ -7450,8 +7942,8 @@ register, define this macro as the regis If the incoming location is not a register, define @code{STRUCT_VALUE_INCOMING} as an expression for an RTX for where the called function should find the value. If it should find the value on -the stack, define this to create a @samp{mem} which refers to the -frame pointer. If the value is a @samp{mem}, the compiler assumes it +the stack, define this to create a @code{mem} which refers to the +frame pointer. If the value is a @code{mem}, the compiler assumes it is for an invisible first argument, and leaves space for it when finding the first real argument. @@ -7509,6 +8001,12 @@ classes: for each class, which classes c contained in it; for each pair of classes, the largest class contained in their union. +When a value occupying several consecutive registers is expected in a +certain class, all the registers used must belong to that class. +Therefore, register classes cannot be used to enforce a requirement for +a register pair to start with an even-numbered register. The way to +specify this requirement is with @code{HARD_REGNO_MODE_OK}. + Register classes used for input-operands of bitwise-and or shift instructions have a special requirement: each such class must have, for each fixed-point machine mode, a subclass whose registers can transfer that @@ -7616,7 +8114,7 @@ for a @samp{moveq} instruction, the valu @code{DATA_REGS} as long as @var{class} includes the data registers. Requiring a data register guarantees that a @samp{moveq} will be used. -If @var{x} is a @samp{const_double}, by returning @code{NO_REGS} +If @var{x} is a @code{const_double}, by returning @code{NO_REGS} you can force @var{x} into a memory constant. This is useful on certain machines where immediate floating values cannot be loaded into certain kinds of registers. @@ -7666,7 +8164,7 @@ not one of those letters, the value shou A C expression that defines the machine-dependent operand constraint letters that specify particular ranges of floating values. If @var{c} is one of those letters, the expression should check that @var{value}, an RTX -of code @samp{const_double}, is in the appropriate range and return 1 if +of code @code{const_double}, is in the appropriate range and return 1 if so, 0 otherwise. If @var{c} is not one of those letters, the value should be 0 regardless of @var{value}. @end table @@ -7866,15 +8364,20 @@ arguments; @var{mode}, the machine mode the data type of the argument as a tree node or 0 if that is not known (which happens for C support library functions); and @var{named}, which is 1 for an ordinary argument and 0 for nameless arguments that -correspond to @samp{...} in the called function's prototype. +correspond to @samp{@dots{}} in the called function's prototype. -The value of the expression should either be a @samp{reg} RTX for the +The value of the expression should either be a @code{reg} RTX for the hard register in which to pass the argument, or zero to pass the argument on the stack. For the Vax and 68000, where normally all arguments are pushed, zero suffices as a definition. +The usual way to make the ANSI library @file{stdarg.h} work on a machine +where some arguments are usually passed in registers, is to cause +nameless arguments to be passed on the stack instead. This is done +by making @code{FUNCTION_ARG} return 0 whenever @var{named} is 0. + @item FUNCTION_INCOMING_ARG (@var{cum}, @var{mode}, @var{type}, @var{named}) Define this macro if the target machine has ``register windows'', so that the register in which a function sees an arguments is not @@ -7978,6 +8481,20 @@ frame pointer is in wanted, the macro ca @code{frame_pointer_needed}. The variable's value will be 1 at run time in a function that needs a frame pointer. +On machines where arguments may be passed in registers, and not have +stack space allocated, this macro must examine the variable +@code{current_function_pretend_args_size}, and allocate that many bytes +of uninitialized space on the stack just underneath the first argument +arriving on the stack. (This may not be at the very end of the stack, +if the calling sequence has pushed anything else since pushing the stack +arguments. But usually, on such machines, nothing else has been pushed +yet, because the function prologue itself does all the pushing.) + +This ``pretend argument'' space is allocated in functions that use the +ANSI library @file{stdarg.h} to accept anonymous arguments of +unspecified types; the last named argument is copied into the space, so +that the anonymous arguments follow it consecutively. + @item FUNCTION_PROFILER (@var{file}, @var{labelno}) A C statement or compound statement to output to @var{file} some assembler code to call the profiling subroutine @code{mcount}. @@ -8038,10 +8555,10 @@ instruction or the function epilogue ign pointer; in other words, if it is safe to delete an instruction to adjust the stack pointer before a return from the function. -Note that this macro's value is relevant only for for which frame -pointers are maintained. It is never possible to delete a final stack -adjustment in a function that has no frame pointer, and the compiler -knows this regardless of @code{EXIT_IGNORES_STACK}. +Note that this macro's value is relevant only for functions for which +frame pointers are maintained. It is never safe to delete a final +stack adjustment in a function that has no frame pointer, and the +compiler knows this regardless of @code{EXIT_IGNORES_STACK}. @item FUNCTION_EPILOGUE (@var{file}, @var{size}) A C compound statement that outputs the assembler code for exit from a @@ -8099,6 +8616,12 @@ Even if your machine description specifi frame pointer in the frame pointer register, you must still define @code{FIX_FRAME_POINTER_ADDRESS}, but the definition will never be executed at run time, so it may be empty. + +@item LONGJMP_RESTORE_FROM_STACK +Define this macro if the @code{longjmp} function restores registers +from the stack frames, rather than from those saved specifically by +@code{setjmp}. Certain quantities must not be kept in registers +across a call to @code{setjmp} on such machines. @end table @node Library Names, Addressing Modes, Stack Layout, Machine Macros @@ -8147,7 +8670,7 @@ Define this macro if GNU CC should gener rather than the BSD functions @code{bcopy} and @code{bzero}. @end table -@node Addressing Modes, Cross-compilation, Library Names, Machine Macros +@node Addressing Modes, Delayed Branch, Library Names, Machine Macros @section Addressing Modes @table @code @@ -8162,8 +8685,8 @@ Similar for other kinds of addressing. @item CONSTANT_ADDRESS_P (@var{x}) A C expression that is 1 if the RTX @var{x} is a constant whose value is an integer. This includes integers whose values are not explicitly -known, such as @samp{symbol_ref} and @samp{label_ref} expressions and -@samp{const} arithmetic expressions. +known, such as @code{symbol_ref} and @code{label_ref} expressions and +@code{const} arithmetic expressions. On most machines, this can be defined as @code{CONSTANT_P (@var{x})}, but a few machines are more restrictive in which constant addresses @@ -8205,6 +8728,17 @@ for index registers, and so on). Then o need have two variants; the higher levels of macros may be the same whether strict or not.@refill +Normally, constant addresses which are the sum of a @code{symbol_ref} +and an integer are stored inside a @code{const} RTX to mark them as +constant. Therefore, there is no need to recognize such sums as +legitimate addresses. + +Usually @code{PRINT_OPERAND_ADDRESS} is not prepared to handle constant +sums that are not marked with @code{const}. It assumes that a naked +@code{plus} indicates indexing. If so, then you @emph{must} reject such +naked constant sums as illegitimate addresses, so that none of them will +be given to @code{PRINT_OPERAND_ADDRESS}.@refill + @item REG_OK_FOR_BASE_P (@var{x}) A C expression that is nonzero if @var{x} (assumed to be a @code{reg} RTX) is valid for use as a base register. For hard registers, it @@ -8268,13 +8802,129 @@ You may assume that @var{addr} is a vali @item LEGITIMATE_CONSTANT_P (@var{x}) A C expression that is nonzero if @var{x} is a legitimate constant for an immediate operand on the target machine. You can assume that -either @var{x} is a @samp{const_double} or it satisfies +either @var{x} is a @code{const_double} or it satisfies @code{CONSTANT_P}, so you need not check these things. In fact, @samp{1} is a suitable definition for this macro on machines where any -@samp{const_double} is valid and anything @code{CONSTANT_P} is valid.@refill +@code{const_double} is valid and anything @code{CONSTANT_P} is valid.@refill +@end table + +@node Delayed Branch, Condition Code, Addressing Modes, Machine Macros +@section Parameters for Delayed Branch Optimization + +@table @code +@item HAVE_DELAYED_BRANCH +Define this macro if the target machine has delayed branches, that is, +a branch does not take effect immediately, and the actual branch +instruction may be followed by one or more instructions that will be +issued before the PC is actually changed. + +If defined, this allows a special scheduling pass to be run after the +second jump optimization to attempt to reorder instructions to exploit +this. Defining this macro also requires the definition of certain +other macros described below. + +@item DBR_SLOTS_AFTER (@var{insn}) +This macro must be defined if @code{HAVE_DELAYED_BRANCH} is defined. +Its definition should be a C expression returning the number of +available delay slots following the instruction(s) output by the +pattern for @var{insn}. The definition of ``slot'' is +machine-dependent, and may denote instructions, bytes, or whatever. + +@item DBR_INSN_SLOTS (@var{insn}) +This macro must be defined if @code{HAVE_DELAYED_BRANCH} is defined. +It should be a C expression returning the number of slots (typically +the number of machine instructions) consumed by @var{insn}. + +You may assume that @var{insn} is truly an insn, not a note, label, +barrier, dispatch table, @code{use}, or @code{clobber}. + +@item DBR_INSN_ELIGIBLE_P (@var{insn}, @var{dinsn}) +A C expression whose value is non-zero if it is legitimate to put +@var{insn} in the delay slot following @var{dinsn}. + +You do not need to take account of data flow considerations in the +definition of this macro, because the delayed branch optimizer always +does that. This macro is needed only when certain insns may not be +placed in certain delay slots for reasons not evident from the RTL +expressions themselves. If there are no such problems, you don't need +to define this macro. + +You may assume that @var{insn} is truly an insn, not a note, label, +barrier, dispatch table, @code{use}, or @code{clobber}. You may +assume that @var{dinsn} is a jump insn with a delay slot. + +@item DBR_OUTPUT_SEQEND(@var{file}) +A C statement, to be executed after all slot-filler instructions have +been output. If necessary, call @code{dbr_sequence_length} to +determine the number of slots filled in a sequence (zero if not +currently outputting a sequence), to decide how many no-ops to output, +or whatever. + +Don't define this macro if it has nothing to do, but it is helpful in +reading assembly output if the extent of the delay sequence is made +explicit (e.g. with white space). + +Note that output routines for instructions with delay slots must be +prepared to deal with not being output as part of a sequence (i.e. +when the scheduling pass is not run, or when no slot fillers could be +found.) The variable @code{final_sequence} is null when not +processing a sequence, otherwise it contains the @code{sequence} rtx +being output. @end table -@node Cross-compilation, Misc, Addressing Modes, Machine Macros +@node Condition Code, Misc, Delayed Branch, Machine Macros +@section Condition Code Information + +The file @file{conditions.h} defines a variable @code{cc_status} to +describe how the condition code was computed (in case the interpretation of +the condition code depends on the instruction that it was set by). This +variable contains the RTL expressions on which the condition code is +currently based, and several standard flags. + +Sometimes additional machine-specific flags must be defined in the machine +description header file. It can also add additional machine-specific +information by defining @code{CC_STATUS_MDEP}. + +@table @code +@item CC_STATUS_MDEP +C code for a data type which is used for declaring the @code{mdep} +component of @code{cc_status}. It defaults to @code{int}. + +@item CC_STATUS_MDEP_INIT +A C expression for the initial value of the @code{mdep} field. It +defaults to 0. + +@item NOTICE_UPDATE_CC (@var{exp}, @var{insn}) +A C compound statement to set the components of @code{cc_status} +appropriately for an insn @var{insn} whose body is @var{exp}. It is +this macro's responsibility to recognize insns that set the condition +code as a byproduct of other activity as well as those that explicitly +set @code{(cc0)}. + +If there are insn that do not set the condition code but do alter +other machine registers, this macro must check to see whether they +invalidate the expressions that the condition code is recorded as +reflecting. For example, on the 68000, insns that store in address +registers do not set the condition code, which means that usually +@code{NOTICE_UPDATE_CC} can leave @code{cc_status} unaltered for such +insns. But suppose that the previous insn set the condition code +based on location @samp{a4@@(102)} and the current insn stores a new +value in @samp{a4}. Although the condition code is not changed by +this, it will no longer be true that it reflects the contents of +@samp{a4@@(102)}. Therefore, @code{NOTICE_UPDATE_CC} must alter +@code{cc_status} in this case to say that nothing is known about the +condition code value. + +The definition of @code{NOTICE_UPDATE_CC} must be prepared to deal +with the results of peephole optimization: insns whose patterns are +@code{parallel} RTXs containing various @code{reg}, @code{mem} or +constants which are just the operands. The RTL structure of these +insns is not sufficient to indicate what the insns actually do. What +@code{NOTICE_UPDATE_CC} should do when it sees one is just to run +@code{CC_STATUS_INIT}. +@end table + +@node Cross-compilation, Misc, Condition Code, Machine Macros @section Cross Compilation and Floating-Point Format While all modern machines use 2's compliment representation for integers, @@ -8373,7 +9023,7 @@ found in @var{low} and @var{high}, two v into a floating point value which is then stored into @var{x}. @end table -@node Misc, Condition Code, Cross-compilation, Machine Macros +@node Misc, Assembler Format, Cross-compilation, Machine Macros @section Miscellaneous Parameters @table @code @@ -8428,7 +9078,42 @@ from memory to memory. @item INT_TYPE_SIZE A C expression for the size in bits of the type @code{int} on the -target machine. +target machine. If you don't define this, the default is one word. + +@item SHORT_TYPE_SIZE +A C expression for the size in bits of the type @code{short} on the +target machine. If you don't define this, the default is half a word. +(If this would be less than one storage unit, it is rounded up to one +unit.) + +@item LONG_TYPE_SIZE +A C expression for the size in bits of the type @code{long} on the +target machine. If you don't define this, the default is one word. + +@item LONG_LONG_TYPE_SIZE +A C expression for the size in bits of the type @code{long long} on the +target machine. If you don't define this, the default is two +words. + +@item CHAR_TYPE_SIZE +A C expression for the size in bits of the type @code{char} on the +target machine. If you don't define this, the default is one quarter +of a word. (If this would be less than one storage unit, it is rounded up +to one unit.) + +@item FLOAT_TYPE_SIZE +A C expression for the size in bits of the type @code{float} on the +target machine. If you don't define this, the default is one word. + +@item DOUBLE_TYPE_SIZE +A C expression for the size in bits of the type @code{double} on the +target machine. If you don't define this, the default is two +words. + +@item LONG_DOUBLE_TYPE_SIZE +A C expression for the size in bits of the type @code{long double} on +the target machine. If you don't define this, the default is two +words. @item SLOW_BYTE_ACCESS Define this macro as a C expression which is nonzero if accessing less @@ -8491,24 +9176,31 @@ can be @item FUNCTION_MODE An alias for the machine mode used for memory references to functions -being called, in @samp{call} RTL expressions. On most machines this +being called, in @code{call} RTL expressions. On most machines this should be @code{QImode}. @item INSN_MACHINE_INFO This macro should expand into a C structure type to use for the machine-dependent info field specified with the optional last argument -in @samp{define_insn} and @samp{define_peephole} patterns. For example, -it might expand into @samp{struct machine_info}; then it would be up +in @code{define_insn} and @code{define_peephole} patterns. For example, +it might expand into @code{struct machine_info}; then it would be up to you to define this structure in the @file{tm.h} file. You do not need to define this macro if you do not write the optional last argument in any of the patterns in the machine description. +@item DEFAULT_MACHINE_INFO +This macro should expand into a C initializer to use to initialize +the machine-dependent info for one insn pattern. It is used for patterns +that do not specify the machine-dependent info. + +If you do not define this macro, zero is used. + @item CONST_COSTS (@var{x}, @var{code}) A part of a C @code{switch} statement that describes the relative costs of constant RTL expressions. It must contain @code{case} labels -for expression codes @samp{const_int}, @samp{const}, @samp{symbol_ref}, @samp{label_ref} -and @samp{const_double}. Each case must ultimately reach a +for expression codes @code{const_int}, @code{const}, @code{symbol_ref}, @code{label_ref} +and @code{const_double}. Each case must ultimately reach a @code{return} statement to return the relative cost of the use of that kind of constant value in an expression. The cost may depend on the precise value of the constant, which is available for examination in @@ -8530,7 +9222,7 @@ found in the file @file{alloca.c}; to us This macro, unlike most, describes the machine that the compiler is running on, rather than the one the compiler is compiling for. Therefore, it should be set in the @file{xm-@var{machine}.h} file -rather than in the @file{xm-@var{machine}.h} file. +rather than in the @file{tm-@var{machine}.h} file. If you do define this macro, you should probably do it as follows: @@ -8538,7 +9230,7 @@ If you do define this macro, you should #ifndef __GNUC__ #define USE_C_ALLOCA #else -#deifne alloca __builtin_alloca +#define alloca __builtin_alloca #endif @end example @@ -8547,59 +9239,7 @@ so that when the compiler is compiled wi efficient built-in @code{alloca} function. @end table -@node Condition Code, Assembler Format, Misc, Machine Macros -@section Condition Code Information - -The file @file{conditions.h} defines a variable @code{cc_status} to -describe how the condition code was computed (in case the interpretation of -the condition code depends on the instruction that it was set by). This -variable contains the RTL expressions on which the condition code is -currently based, and several standard flags. - -Sometimes additional machine-specific flags must be defined in the machine -description header file. It can also add additional machine-specific -information by defining @code{CC_STATUS_MDEP}. - -@table @code -@item CC_STATUS_MDEP -C code for a data type which is used for declaring the @code{mdep} -component of @code{cc_status}. It defaults to @code{int}. - -@item CC_STATUS_MDEP_INIT -A C expression for the initial value of the @code{mdep} field. It -defaults to 0. - -@item NOTICE_UPDATE_CC (@var{exp}, @var{insn}) -A C compound statement to set the components of @code{cc_status} -appropriately for an insn @var{insn} whose body is @var{exp}. It is -this macro's responsibility to recognize insns that set the condition -code as a byproduct of other activity as well as those that explicitly -set @code{(cc0)}. - -If there are insn that do not set the condition code but do alter -other machine registers, this macro must check to see whether they -invalidate the expressions that the condition code is recorded as -reflecting. For example, on the 68000, insns that store in address -registers do not set the condition code, which means that usually -@code{NOTICE_UPDATE_CC} can leave @code{cc_status} unaltered for such -insns. But suppose that the previous insn set the condition code -based on location @samp{a4@@(102)} and the current insn stores a new -value in @samp{a4}. Although the condition code is not changed by -this, it will no longer be true that it reflects the contents of -@samp{a4@@(102)}. Therefore, @code{NOTICE_UPDATE_CC} must alter -@code{cc_status} in this case to say that nothing is known about the -condition code value. - -The definition of @code{NOTICE_UPDATE_CC} must be prepared to deal -with the results of peephole optimization: insns whose patterns are -@samp{parallel} RTXs containing various @samp{reg}, @samp{mem} or -constants which are just the operands. The RTL structure of these -insns is not sufficient to indicate what the insns actually do. What -@code{NOTICE_UPDATE_CC} should do when it sees one is just to run -@code{CC_STATUS_INIT}. -@end table - -@node Assembler Format,, Condition Code, Machine Macros +@node Assembler Format,, Misc, Machine Macros @section Output of Assembler Code @table @code @@ -8666,6 +9306,32 @@ checking for certain assembler construct On systems that use SDB, it is necessary to output certain commands; see @file{tm-attasm.h}. +@item ASM_FILE_END (@var{stream}) +A C expression which outputs to the stdio stream @var{stream} +some appropriate text to go at the end of an assembler file. + +If this macro is not defined, the default is to output nothing +special at the end of the file. Most systems don't require any +definition. + +On systems that use SDB, it is necessary to output certain commands; +see @file{tm-attasm.h}. + +@item ASM_IDENTIFY_GCC (@var{file}) +A C statement to output assembler commands which will identify +the object file as having been compiled with GNU CC (or another +GNU compiler). + +If you don't define this macro, the string @samp{gcc_compiled.:} +is output. This string is calculated to define a symbol which, +on BSD systems, will never be defined for any other reason. +GDB checks for the presence of this symbol when reading the +symbol table of an executable. + +On non-BSD systems, you must arrange communication with GDB in +some other fashion. If GDB is not used on your system, you can +define this macro with an empty body. + @item ASM_APP_ON A C string constant for text to be output before each @code{asm} statement or group of consecutive ones. Normally this is @@ -8688,6 +9354,38 @@ A C string constant for the assembler op following data as writable initialized data. Normally @code{".data"} is right. +@item EXTRA_SECTIONS +A list of names for sections other than the standard two, which are +@code{in_text} and @code{in_data}. You need not define this macro +on a system with no other sections (that GCC needs to use). + +@item EXTRA_SECTION_FUNCTIONS +One or more functions to be defined in @file{varasm.c}. These +functions should do jobs analogous to those of @code{text_section} and +@code{data_section}, for your additional sections. Do not define this +macro if you do not define @code{EXTRA_SECTIONS}. + +@item SELECT_SECTION (@var{exp}) +A C statement or statements to switch to the appropriate section for +output of @var{exp}. You can assume that @var{exp} is either a +@code{VAR_DECL} node or a constant of some sort. Select the section +by calling @code{text_section} or one of the alternatives for other +sections. + +Do not define this macro if you use only the standard two sections +and put all read-only variables and constants in the text section. + +@item SELECT_RTX_SECTION (@var{mode}, @var{rtx}) +A C statement or statements to switch to the appropriate section for +output of @var{rtx} in mode @var{mode}. You can assume that @var{rtx} +is some kind of constant in RTL. The argument @var{mode} is redundant +except in the case of a @code{const_int} rtx. Select the section by +calling @code{text_section} or one of the alternatives for other +sections. + +Do not define this macro if you use only the standard two sections and +put all constants in the text section. + @item REGISTER_NAMES A C initializer containing the assembler's names for the machine registers, each one as a C string constant. This is what translates @@ -8742,11 +9440,16 @@ a different character instead, define th constant for the character you want to use. Do not define this macro if backslash is correct for your system. +@item DBX_STATIC_STAB_DATA_SECTION +Define this macro if it is necessary to go to the data section before +outputting the @samp{.stabs} pseudo-op for a non-global static +variable. + @item ASM_OUTPUT_LABEL (@var{stream}, @var{name}) A C statement (sans semicolon) to output to the stdio stream -@var{stream} the assembler definition of a label named @var{name}. Use -the expression @code{assemble_name (@var{stream}, @var{name})} to output -the name itself; before and after that, output the additional +@var{stream} the assembler definition of a label named @var{name}. +Use the expression @code{assemble_name (@var{stream}, @var{name})} to +output the name itself; before and after that, output the additional assembler syntax for defining the name, and a newline. @item ASM_DECLARE_FUNCTION_NAME (@var{stream}, @var{name}, @var{decl}) @@ -8768,7 +9471,7 @@ that is, available for reference from ot itself; before and after that, output the additional assembler syntax for making that name global, and a newline. -@item ASM_OUTPUT_EXTERNAL (@var{stream}, @var{name}, @var{decl}) +@item ASM_OUTPUT_EXTERNAL (@var{stream}, @var{decl}, @var{name}) A C statement (sans semicolon) to output to the stdio stream @var{stream} any text necessary for declaring the name of an external symbol named @var{name} which is referenced in this compilation but @@ -8779,15 +9482,15 @@ This macro need not be defined if it doe The GNU assembler and most Unix assemblers don't require anything. @item ASM_OUTPUT_LABELREF (@var{stream}, @var{name}) -A C statement to output to the stdio stream @var{stream} a reference in -assembler syntax to a label named @var{name}. The character @samp{_} -should be added to the front of the name, if that is customary on your -operating system, as it is in most Berkeley Unix systems. This macro -is used in @code{assemble_name}. +A C statement to output to the stdio stream @var{stream} a reference +in assembler syntax to a label named @var{name}. The character +@samp{_} should be added to the front of the name, if that is +customary on your operating system, as it is in most Berkeley Unix +systems. This macro is used in @code{assemble_name}. @item ASM_GENERATE_INTERNAL_LABEL (@var{string}, @var{prefix}, @var{num}) -A C statement to store into the string @var{string} a label whose -name is made from the string @var{prefix} and the number @var{num}. +A C statement to store into the string @var{string} a label whose name +is made from the string @var{prefix} and the number @var{num}. This string, when output subsequently by @code{ASM_OUTPUT_LABELREF}, should produce the same output that @code{ASM_OUTPUT_INTERNAL_LABEL} @@ -8809,8 +9512,8 @@ fprintf (@var{stream}, "L%s%d:\n", @var{ Define this if the label before a jump-table needs to be output specially. The first three arguments are the same as for @code{ASM_OUTPUT_INTERNAL_LABEL}; the fourth argument is the -jump-table which follows (a @samp{jump_insn} containing an -@samp{addr_vec} or @samp{addr_diff_vec}). +jump-table which follows (a @code{jump_insn} containing an +@code{addr_vec} or @code{addr_diff_vec}). This feature is used on system V to output a @code{swbeg} statement for the table. @@ -8819,11 +9522,12 @@ If this macro is not defined, these labe @code{ASM_OUTPUT_INTERNAL_LABEL}. @item ASM_OUTPUT_CASE_END (@var{stream}, @var{num}, @var{table}) -Define this if something special must be output at the end of a jump-table. -The definition should be a C statement to be executed after the assembler -code for the table is written. It should write the appropriate code to -stdio stream @var{stream}. The argument @var{table} is the jump-table -insn, and @var{num} is the label-number of the preceding label. +Define this if something special must be output at the end of a +jump-table. The definition should be a C statement to be executed +after the assembler code for the table is written. It should write +the appropriate code to stdio stream @var{stream}. The argument +@var{table} is the jump-table insn, and @var{num} is the label-number +of the preceding label. If this macro is not defined, nothing special is output at the end of the jump-table. @@ -8918,6 +9622,14 @@ an RTL expression which represents a con @samp{output_addr_const (@var{exp})} to output this value as an assembler expression.@refill +@item ASM_OUTPUT_DOUBLE_INT (@var{stream}, @var{exp}) +A C statement to output to the stdio stream @var{stream} an assembler +instruction to assemble a @code{long long} constant whose value is +@var{exp}. The argument @var{exp} will be an RTL expression which +represents a constant value. It may be a @code{const_double} RTX, +or it may be an ordinary single-precision constant. In the latter +case, you should zero-extend it. + @item ASM_OUTPUT_BYTE (@var{stream}, @var{value}) A C statement to output to the stdio stream @var{stream} an assembler instruction to assemble a single byte containing the number @var{value}. @@ -8968,6 +9680,14 @@ assembler syntax for defining the name, This macro controls how the assembler definitions of uninitialized static variables are output. +@item ASM_OUTPUT_SOURCE_FILENAME (@var{stream}, @var{name}) +A C statment to output DBX or SDB debugging information which indicates +that filename @var{name} is the current source file to the stdio stream +@var{stream}. + +This macro need not be defined if the standard form of debugging +information for the debugger in use is appropriate. + @item ASM_OUTPUT_SOURCE_LINE (@var{stream}, @var{line}) A C statment to output DBX or SDB debugging information before code for line number @var{line} of the current source file to the @@ -9016,6 +9736,9 @@ that includes @samp{%}-sequences to subs care of the substitution yourself. Just be sure to increment @var{ptr} over whatever text should not be output normally. +If you need to look at the operand values, they can be found as the +elements of @code{recog_operand}. + If the macro definition does nothing, the instruction is output in the usual way. @@ -9063,6 +9786,13 @@ When the machine description has a speci with a null pointer for @var{x} and the punctuation character for @var{code}. +@item PRINT_OPERAND_PUNCT_VALID_P (@var{code}) +A C expression which evaluates to true if @var{code} is a valid +punctuation character for use in the @code{PRINT_OPERAND} macro. If +@code{PRINT_OPERAND_PUNCT_VALID_P} is not defined, it means that no +punctuation characters (except for the standard one, @samp{%}) are used +in this way. + @item PRINT_OPERAND_ADDRESS (@var{stream}, @var{x}) A C compound statement to output to stdio stream @var{stream} the assembler syntax for an instruction operand that is a memory reference