--- gcc/internals.texinfo 2018/04/24 16:41:12 1.1.1.5 +++ gcc/internals.texinfo 2018/04/24 16:42:54 1.1.1.7 @@ -39,9 +39,9 @@ Free Software Foundation instead of in t @sp 2 @center Richard M. Stallman @sp 3 -@center last updated 26 June 1988 +@center last updated 17 August 1988 @sp 1 -@center for version 1.23 +@center for version 1.26 @page @vskip 0pt plus 1filll Copyright @copyright{} 1988 Free Software Foundation, Inc. @@ -275,10 +275,17 @@ Charles LaBrec contributed the support f 68020 system. @item -Michael Tiemann of MCC wrote the description of the National -Semiconductor 32000 series cpu, with some contributions from Jan Stein -of the Chalmers Computer Club. Tiemann also wrote the code for inline -function integration and for the SPARC cpu. +Michael Tiemann of MCC wrote most of the description of the National +Semiconductor 32000 series cpu. He also wrote the code for inline +function integration and for the SPARC cpu and Motorola 88000 cpu +and part of the Sun FPA support. + +@item +Jan Stein of the Chalmers Computer Society provided support for +Genix, as well as part of the 32000 machine description. + +@item +Randy Smith finished the Sun FPA support. @item Robert Brown implemented the support for Encore 32000 systems. @@ -292,6 +299,9 @@ Alex Crain provided changes for the 3b1. @item Greg Satz and Chris Hanson assisted in making GNU CC work on HP-UX for the 9000 series 300. + +@item +William Schelter did most of the work on the Intel 80386 support. @end itemize @node Options, Installation, Contributors, Top @@ -968,10 +978,23 @@ config file for the machine you are usin file is responsible for defining information about the host machine. It includes @file{tm.h}. -The file's name should be @file{config-@var{machine}.h}. On VMS, -use @file{config-vms.h} rather than @file{config-vax.h}. On the -HP 9000 series 300, use @file{config-hp9k3.h} rather than -@file{config-m68k.h}. +The file's name should be @file{config-@var{machine}.h}, with these +exceptions: + +@table @file +@item config-vms.h +for vaxen running VMS. +@item config-vaxv.h +for vaxen running system V. +@item config-i386v.h +for Intel 80386's running system V. +@item config-sun4.h +for Suns (model 3 or 4) running @emph{operating system} version 4. +@item config-hp9k3.h +for the HP 9000 series 300. +@item config-gnx.h +for the ns32000 running Genix +@end table If your system does not support symbolic links, you might want to set up @file{config.h} to contain a @samp{#include} command which @@ -982,41 +1005,53 @@ Make a symbolic link named @file{tm.h} t macro file for your machine (its name should be @file{tm-@var{machine}.h}). -For the 68000/68020, do not use @file{tm-m68k.h} directly; -instead use one of the files @file{tm-sun3.h}, @file{tm-sun2.h}, -@file{tm-isi68.h}, @file{tm-news800.h} or @file{tm-3b1.h}. Each -of those files includes @file{tm-m68k.h} but sets up a few things -differently as appropriate to the specific model of -machine.@refill - -There are two files you can use for a 680x0 running HPUX: -@file{tm-hp9k320.h} and @file{tm-hp9k320g.h}. Use the former if -you are installing GNU CC alone. The latter is for another option -where GNU CC together with the GNU assembler, linker, debugger -and other utilities are used to replace all of HPUX that deals -with compilation. Not all of the pieces of GNU software needed for -this mode of operation are as yet in distribution; full instructions -will appear here in the future.@refill +If your system is a 68000, don't use the file @file{tm-m68k.h} +directly. Instead, use one of these files: -For the vax, use @file{tm-vax.h} on Unix, or @file{tm-vms.h} on -VMS.@refill - -For the SPARC, use @file{tm-sparc.h}. Note that the SPARC support -@strong{has a fatal bug}; to use it, you will have to debug it. +@table @file +@item tm-sun3.h +for Sun 3 machines. +@item tm-sun2.h +for Sun 2 machines. +@item tm-3b1.h +for AT&T 3b1 (aka 7300 Unix PC). +@item tm-isi68.h +for Integrated Solutions systems. +@item tm-news800.h +for SONY News systems. +@item tm-hp9k320.h +for HPUX systems, if you are using GNU CC with the system's +assembler and linker. +@item tm-hp9k320g.h +for HPUX systems, if you are using the GNU assembler, linker and +other utilities. Not all of the pieces of GNU software needed +for this mode of operation are as yet in distribution; full +instructions will appear here in the future.@refill +@end table + +For the vax, use @file{tm-vax.h} on BSD Unix, @file{tm-vaxv.h} on +system V, or @file{tm-vms.h} on VMS.@refill + +For the SPARC (Sun 4), use @file{tm-sparc.h}. + +For the Motorola 88000, use @file{tm-m88k.h}. The support for the +88000 has a few unfinished spots because there was no way to run the +output. Bugs are suspected in handling of branch-tables and in +the function prologue and epilogue. + +For the 80386, don't use @file{tm-i386.h} directly. Use +@file{tm-i386v.h} if the target machine is running system V, +@file{tm-seq386.h} for a Sequent 386 system, or @file{tm-compaq.h} for +a Compaq. For the 32000, use @file{tm-sequent.h} if you are using a Sequent -machine, or @file{tm-encore.h} for an Encore machine; otherwise, -perhaps @file{tm-ns32k.h} will work for you. If you are trying to use -GNU CC on GENIX, you may need to get the version of @code{malloc} from -GNU Emacs instead of the system library version, and you probably need -to cause the following assembler code to be executed in @file{crt0.o} -in order to run the GNU CC output: - -@example -lprd sb,$0 -sprd mod,r0 -movqd $0,0(r0) -@end example +machine, or @file{tm-encore.h} for an Encore machine, or +@file{tm-gnx.h} if you are using Genix version 3; otherwise, perhaps +@file{tm-ns32k.h} will work for you. + +Note that Genix has bugs in @code{alloca} and @code{malloc}; you must +get the compiled versions of these from GNU Emacs and edit GNU CC's +@file{Makefile} to use them. Note that Encore systems are supported only under BSD. @@ -1032,13 +1067,13 @@ subroutine file for your machine (its na @item Make sure the Bison parser generator is installed. (This is -unnecessary if the Bison output files @file{parse.tab.c} and -@file{cexp.c} are more recent than @file{parse.y} and @file{cexp.y} +unnecessary if the Bison output files @file{c-parse.tab.c} and +@file{cexp.c} are more recent than @file{c-parse.y} and @file{cexp.y} and you do not plan to change the @samp{.y} files.) Note that if you have an old version of Bison you may get an error from the line with the @samp{%expect} directive. If so, simply remove -that line from @file{parse.y} and proceed. +that line from @file{c-parse.y} and proceed. @item If you are using a Sun, make sure the environment variable @@ -1083,7 +1118,7 @@ time, do this: @example make stage2 -make CC=stage2/gcc CFLAGS="-g -O -Bstage2/" +Make CC=stage2/gcc CFLAGS="-g -O -Bstage2/" foreach file (*.o) cmp $file stage2/$file end @@ -1095,6 +1130,9 @@ that the stage 2 compiler has compiled G therefore a potentially serious bug which you should investigate and report (@pxref{Bugs}). +Aside from the @samp{-B} option, the options should be the same as +when you made stage 2. + @item Install the compiler driver, the compiler's passes and run-time support. You can use the following command: @@ -1335,6 +1373,16 @@ by Bison grammar rules rather than C cod flag cannot alter it. @item +PCC allows typedef names to be used as function parameters. The +difficulty described immediately above applies here too. + +@item +When compiling functions that return @code{float}, PCC converts it to +a double. GNU CC actually returns a @code{float}. If you are concerned +with PCC compatibility, you should declare your functions to return +@code{double}; you might as well say what you mean. + +@item When compiling functions that return structures or unions, GNU CC output code uses a method different from that used on most versions of Unix. As a result, code compiled with GNU CC cannot call a @@ -1669,7 +1717,7 @@ struct line @{ @{ struct line *thisline = (struct line *) malloc (sizeof (struct line) + this_length); - thisline->length = thislength; + thisline->length = this_length; @} @end example @@ -2376,7 +2424,7 @@ and unions of other sizes are returned b passed by the caller in a register. This method is faster than the one normally used by PCC and is also reentrant. The register used for passing the address is specified by the machine-description macro -@code{STRUCT_VALUE_REGNUM}. +@code{STRUCT_VALUE}. GNU CC always passes arguments on the stack. At some point it will be extended to pass arguments in registers, for machines which use that as @@ -2461,12 +2509,12 @@ represented as declaration nodes. Constant folding and associative-law simplifications are also done during this pass. -The source files for parsing are @file{parse.y}, @file{decl.c}, -@file{typecheck.c}, @file{stor-layout.c}, @file{fold-const.c}, and -@file{tree.c}. The last three are intended to be language-independent. -There are also header files @file{parse.h}, @file{c-tree.h}, -@file{tree.h} and @file{tree.def}. The last two define the format of -the tree representation.@refill +The source files for parsing are @file{c-parse.y}, @file{c-decl.c}, +@file{c-typeck.c}, @file{c-convert.c}, @file{stor-layout.c}, +@file{fold-const.c}, and @file{tree.c}. The last three files are +intended to be language-independent. There are also header files +@file{c-parse.h}, @file{c-tree.h}, @file{tree.h} and @file{tree.def}. +The last two define the format of the tree representation.@refill @item RTL generation. This is the conversion of syntax tree into RTL code. @@ -2910,6 +2958,16 @@ that the value of the expression never c current function). In an RTL dump, this flag is represented as @samp{/u}. + +@item integrated +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 +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 +uses. @end table @node Machine Modes, Constants, Flags, RTL @@ -3170,6 +3228,11 @@ The compilation parameter @code{WORDS_BI that word number zero is the most significant part; otherwise, it is 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 +its first operand. The reload pass eliminates these cases by +reloading the @samp{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 @code{DFmode} value does not have the same format as a single-precision @@ -4274,8 +4337,9 @@ 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} -expression in the pattern for each expression number, and they must -appear in order of increasing expression number. +expression in the pattern for each operand number. Usually operands +are numbered in the order of appearance in @samp{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, @@ -4890,6 +4954,10 @@ machine description, but typically on a pseudo registers that did not get hard registers, while on other machines explicit memory references will get optional reloads. +In addition, the constraints must allow any hard register to be moved +to any other hard register (provided that @code{HARD_REGNO_MODE_OK} +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} with mode @var{m} of a register whose natural mode is wider, @@ -5093,10 +5161,24 @@ that refers to the label to jump to. Ju meet condition @var{cond}. @item @samp{call} -Subroutine call instruction. Operand 1 is the number of bytes of -arguments pushed (in mode @code{SImode}), and operand 0 is the -function to call. Operand 0 should be a @samp{mem} RTX whose address -is the address of the function. +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}); +operand 2 is the number of registers used as operands. + +On most machines, operand 2 is not actually stored into the RTL pattern. + +Operand 0 should be a @samp{mem} RTX whose address is the address of +the function. + +@item @samp{call_value} +Subroutine call instruction returning a value. Operand 0 is the hard +register in which the value is returned. There are three more +operands, the same as the three operands of the @samp{call} +instruction (but with numbers increased by one). + +Subroutines that return @code{BLKmode} objects use the @samp{call} +insn. @item @samp{return} Subroutine return instruction. This instruction pattern name should be @@ -5656,8 +5738,10 @@ compiler source files include @file{conf @table @code @item CPP_PREDEFINES -Define this to be a string constant containing @samp{-D} options -to define the predefined macros that identify this machine and system. +Define this to be a string constant containing @samp{-D} options to +define the predefined macros that identify this machine and system. +These macros will be predefined unless the @samp{-ansi} option is +specified. For example, on the Sun, one can use the value @@ -5665,6 +5749,20 @@ For example, on the Sun, one can use the "-Dmc68000 -Dsun -Dunix" @end example +@item CPP_SPEC +A C string constant that tells the GNU CC driver program options to +pass to CPP. It can also specify how to translate options you +give to GNU CC into options for GNU CC to pass to the CPP. + +Do not define this macro if it does not need to do anything. + +@item CC1_SPEC +A C string constant that tells the GNU CC driver program options to +pass to CC1. It can also specify how to translate options you +give to GNU CC into options for GNU CC to pass to the CC1. + +Do not define this macro if it does not need to do anything. + @item extern int target_flags; This declaration should be present. @@ -5714,12 +5812,14 @@ with opposite meanings, and picks the la @{ "68000", -1@}, \ @{ "", 1@}@} @end example -@end table -Sometimes certain combinations of command options do not make sense on a -particular target machine. You can define a macro @code{OVERRIDE_OPTIONS} -to take account of this. This macro, if defined, is executed once -just after all the command options have been parsed. +@item OVERRIDE_OPTIONS +Sometimes certain combinations of command options do not make sense on +a particular target machine. You can define a macro +@code{OVERRIDE_OPTIONS} to take account of this. This macro, if +defined, is executed once just after all the command options have been +parsed. +@end table @node Storage Layout, Registers, Run-time Target, Machine Macros @section Storage Layout @@ -5756,6 +5856,9 @@ Number of storage units in a word; norma @item POINTER_SIZE Width of a pointer, in bits. +@item POINTER_BOUNDARY +Alignment required for pointers stored in memory, in bits. + @item PARM_BOUNDARY Alignment required for function parameters on the stack, in bits. @@ -5770,7 +5873,7 @@ Alignment required for a function entry @item BIGGEST_ALIGNMENT Biggest alignment that any data type can require on this machine, in bits. -@item EMPTY_FIELD_ALIGNMENT +@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;}. @@ -5786,6 +5889,16 @@ Define this if instructions will fail to on the nominal alignment. If instructions will merely go slower in that case, do not define this macro. +@item PCC_BITFIELD_TYPE_MATTERS +Define this if you wish to imitate a certain bizarre behavior pattern +of some instances of PCC: a bit field whose declared type is +@code{int} has the same effect on the size and alignment of a +structure as an actual @code{int} would have. + +Just what effect that is in GNU CC depends on other parameters, but on +most machines it would force the structure's alignment and size to a +multiple of 32 or @code{BIGGEST_ALIGNMENT} bits. + @item CHECK_FLOAT_VALUE (@var{mode}, @var{value}) A C statement to validate the value @var{value} (or type @code{double}) for mode @var{mode}. This means that you check whether @@ -5816,9 +5929,10 @@ pseudo register's number really is assig An initializer that says which registers are used for fixed purposes all throughout the compiled code and are therefore not available for general allocation. These would include the stack pointer, the frame -pointer, the program counter on machines where that is considered one -of the addressable registers, and any other numbered register with a -standard use. +pointer (except on machines where that can be used as a general +register when no frame pointer is needed), the program counter on +machines where that is considered one of the addressable registers, +and any other numbered register with a standard use. This information is expressed as a sequence of numbers, separated by commas and surrounded by braces. The @var{n}th number is 1 if @@ -5851,6 +5965,18 @@ on target flags. You need not define this macro if it has no work to do. +If the usage of an entire class of registers depends on the target +flags, you may indicate this to gcc by using this macro to modify +@code{fixed_regs} and @code{call_used_regs} to 1 for each of the +registers in the classes which should not be used by gcc. Also define +the macro @code{REG_CLASS_FROM_LETTER} to return @code{NO_REGS} if it +is called with a letter for a class that shouldn't be used. + +(However, if this class is not included in @code{GENERAL_REGS} and all +of the insn patterns whose constraints permit this class are +controlled by target switches, then GCC will automatically avoid using +these registers when the target switches are opposed to them.) + @item OVERLAPPING_REGNO_P (@var{regno}) If defined, this is a C expression whose value is @var{regno} is nonzero if hard register number @var{regno} is an overlapping @@ -6006,7 +6132,7 @@ The register number used for passing a f pointer. This is needed for languages such as Pascal and Algol where functions defined within other functions can access the local variables of the outer functions; it is not currently used because C -does not provide this feature. +does not provide this feature, but you must define the macro. The static chain register need not be a fixed register. @@ -6014,8 +6140,34 @@ The static chain register need not be a When a function's value's mode is @code{BLKmode}, the value is not returned according to @code{FUNCTION_VALUE}. Instead, the caller passes the address of a block of memory in which the value should be -stored. @code{STRUCT_VALUE_REGNUM} is the register in which this -address is passed. +stored. + +If this value is passed in a register, then @code{STRUCT_VALUE_REGNUM} +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 +address is passed as an ``invisible'' first argument. + +@item STRUCT_VALUE_INCOMING_REGNUM +On some architectures the place where the structure value address +is found by the called function is not the same place that the +caller put it. This can be due to register windows, or it could +be because the function prologue moves it to a different place. + +If the incoming location of the structure value address is in a +register, define this macro as the register number. + +@item STRUCT_VALUE_INCOMING +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 +is for an invisible first argument, and leaves space for it when +finding the first real argument. @item REG_ALLOC_ORDER If defined, an initializer for a vector of integers, containing the @@ -6083,6 +6235,13 @@ Each register class has a number, which the class name to type @code{int}. The number serves as an index in many of the tables described below. +@item N_REG_CLASSES +The number of distinct register classes, defined as follows: + +@example +#define N_REG_CLASSES (int) LIM_REG_CLASSES +@end example + @item REG_CLASS_NAMES An initializer containing the names of the register classes as C string constants. These names are used in writing some of the debugging dumps. @@ -6104,15 +6263,22 @@ A C expression whose value is a register which is @dfn{minimal}, meaning that no smaller class also contains the register. +@item BASE_REG_CLASS +A macro whose definition is the name of the class to which a valid +base register must belong. A base register is one used in an address +which is the register value plus a displacement. + @item INDEX_REG_CLASS -A macro whose definition is the name of the class to which a valid index -register must belong. +A macro whose definition is the name of the class to which a valid +index register must belong. An index register is one used in an +address where its value is either multiplied by a scale factor or +added to another register (as well as added to a displacement). @item REG_CLASS_FROM_LETTER (@var{char}) A C expression which defines the machine-dependent operand constraint -letters for register classes. If @var{char} is such a letter, the value -should be the register class corresponding to it. Otherwise, the value -should be @code{NO_REGS}. +letters for register classes. If @var{char} is such a letter, the +value should be the register class corresponding to it. Otherwise, +the value should be @code{NO_REGS}. @item REGNO_OK_FOR_BASE_P (@var{num}) A C expression which is nonzero if register number @var{num} is @@ -6132,8 +6298,8 @@ two registers, neither one of them scale labeled the ``base'' and the other the ``index''; but whichever labeling is used must fit the machine's constraints of which registers may serve in each capacity. The compiler will try both labelings, -looking for one that is valid, and reload one or both registers only -if neither labeling works. +looking for one that is valid, and will reload one or both registers +only if neither labeling works. @item PREFERRED_RELOAD_CLASS (@var{x}, @var{class}) A C expression that places additional restrictions on the register class @@ -6154,6 +6320,11 @@ the value of this macro is always @code{ @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} +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. + @item CLASS_MAX_NREGS (@var{class}, @var{mode}) A C expression for the maximum number of consecutive registers of class @var{class} needed to hold a value of mode @var{mode}. @@ -6310,7 +6481,7 @@ compiled. @item FUNCTION_VALUE_REGNO_P (@var{regno}) A C expression that is nonzero if @var{regno} is the number of a hard -register in which function values are sometimes returned. +register in which the values of called function may come back. A register whose use for returning values is limited to serving as the second of a pair (for a value of type @code{double}, say) need not be @@ -6321,6 +6492,10 @@ suffices: #define FUNCTION_VALUE_REGNO_P(N) ((N) == 0) @end example +If the machine has register windows, so that the caller and the called +function use different registers for the return value, this macro +should recognize only the caller's register numbers. + @item FUNCTION_ARG (@var{cum}, @var{mode}, @var{type}, @var{named}) A C expression that controls whether a function argument is passed in a register, and which register. @@ -6378,10 +6553,12 @@ of @code{FUNCTION_ARG} and other related machines, the type @code{int} suffices and can hold the number of bytes of argument so far. -@item INIT_CUMULATIVE_ARGS (@var{cum}) +@item INIT_CUMULATIVE_ARGS (@var{cum}, @var{fntype}) A C statement (sans semicolon) for initializing the variable @var{cum} for the state at the beginning of the argument list. The variable has -type @code{CUMULATIVE_ARGS}. +type @code{CUMULATIVE_ARGS}. The value of @var{fntype} is the tree node +for the data type of the function which will receive the args, or 0 +if the args are to a compiler support library function. @item FUNCTION_ARG_ADVANCE (@var{cum}, @var{mode}, @var{type}, @var{named}) Update the summarizer variable @var{cum} to advance past an argument @@ -6398,6 +6575,24 @@ the structure-value address. On many ma used for this purpose since all function arguments are pushed on the stack. +@item FUNCTION_ARG_PADDING (@var{mode}, @var{size}) +If defined, a C expression which determines whether, and in which direction, +to pad out an argument with extra space. The value should be of type +@code{enum direction}: either @code{upward} to pad above the argument, +@code{downward} to pad below, or @code{none} to inhibit padding. + +The argument @var{size} is an RTX which describes the size of the +argument, in bytes. It should be used only if @var{mode} is +@code{BLKmode}. Otherwise, @var{size} is 0. + +This macro does not control the @emph{amount} of padding; that is +always just enough to reach the next multiple of @code{PARM_BOUNDARY}. + +This macro has a default definition which is right for most systems. +For little-endian machines, the default is to pad upward. For +big-endian machines, the default is to pad downward for an argument of +constant size shorter than an @code{int}, and upward otherwise. + @item FUNCTION_PROLOGUE (@var{file}, @var{size}) A C compound statement that outputs the assembler code for entry to a function. The prologue is responsible for setting up the stack frame, @@ -6579,6 +6774,28 @@ 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 +@item REG_OK_FOR_BASE_P (@var{x}) +A C expression that is nonzero if @var{x} (asumed to be a @code{reg} +RTX) is valid for use as a base register. For hard registers, it +should always accept those which the hardware permits and reject the +others. Whether the macro accepts or rejects pseudo registers must be +controlled by @code{REG_OK_STRICT} as described above. This usually +requires two variant definitions, of which @code{REG_OK_STRICT} +controls the one actually used. + +@item REG_OK_FOR_INDEX_P (@var{x}) +A C expression that is nonzero if @var{x} (asumed to be a @code{reg} +RTX) is valid for use as an index register. + +The difference between an index register and a base register is that +the index register may be scaled. If an address involves the sum of +two registers, neither one of them scaled, then either one may be +labeled the ``base'' and the other the ``index''; but whichever +labeling is used must fit the machine's constraints of which registers +may serve in each capacity. The compiler will try both labelings, +looking for one that is valid, and will reload one or both registers +only if neither labeling works. + @item LEGITIMIZE_ADDRESS (@var{x}, @var{oldx}, @var{mode}, @var{win}) A C compound statement that attempts to replace @var{x} with a valid memory address for an operand of mode @var{mode}. @var{win} will be a @@ -6720,6 +6937,12 @@ On many machines, this expression can be Define this macro if it is as good or better to call a constant function address than to call an address kept in a register. +@item PROMOTE_PROTOTYPES +Define this macro if an argument declared as @code{char} or +@code{short} in a prototype should actually be passed as an +@code{int}. In addition to avoiding errors in certain cases of +mismatch, it also makes for better code on certain machines. + @item STORE_FLAG_VALUE A C expression for the value stored by a store-flag instruction (@code{s@var{cond}}) when the condition is true. This is usually 1 or @@ -6741,7 +6964,7 @@ An alias for the machine mode used for m being called, in @samp{call} RTL expressions. On most machines this should be @code{QImode}. -@item CONST_COST (@var{x}, @var{code}) +@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} @@ -6822,6 +7045,22 @@ give to GNU CC into options for GNU CC t Do not define this macro if it does not need to do anything. +@item LIB_SPEC +Another C string constant used much like @code{LINK_SPEC}. The difference +between the two is that @code{LIBS_SPEC} is used at the end of the +command given to the linker. + +If this macro is not defined, a default is provided that +loads the standard C library from the usual place. See @file{gcc.c}. + +@item STARTFILE_SPEC +Another C string constant used much like @code{LINK_SPEC}. The +difference between the two is that @code{STARTFILE_SPEC} is used at +the very beginning of the command given to the linker. + +If this macro is not defined, a default is provided that loads the +standard C startup file from the usual place. See @file{gcc.c}. + @item ASM_FILE_START (@var{stream}) A C expression which outputs to the stdio stream @var{stream} some appropriate text to go at the start of an assembler file. @@ -6877,6 +7116,17 @@ in response to the @samp{-g} option. Define this macro if GNU CC should produce debugging output for SDB in response to the @samp{-g} option. +@item PUT_SDB_@var{op} +Define these macros to override the assembler syntax for the special +SDB assembler directives. See @file{sdbout.c} for a list of these +macros and their arguments. If the standard syntax is used, you need +not define them yourself. + +@item SDB_GENERATE_FAKE +Define this macro to override the usual method of constructing a dummy +name for anonymous structure and union types. See @file{sdbout.c} for +more infomation. + @item DBX_NO_XREFS Define this macro if DBX on your system does not support the construct @samp{xs@var{tagname}}. On some systems, this construct is used to @@ -6906,11 +7156,13 @@ the expression @code{assemble_name (@var 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}) +@item ASM_DECLARE_FUNCTION_NAME (@var{stream}, @var{name}, @var{decl}) A C statement (sans semicolon) to output to the stdio stream -@var{stream} any text necessary for declaring the name of a function -which is being defined. This macro is responsible for outputting -the label definition (perhaps using @code{ASM_OUTPUT_LABEL}). +@var{stream} any text necessary for declaring the name @var{name} of a +function which is being defined. This macro is responsible for +outputting the label definition (perhaps using +@code{ASM_OUTPUT_LABEL}). The argument @var{decl} is the +@code{FUNCTION_DECL} tree node representing the function. If this macro is not defined, then the function name is defined in the usual manner as a label (by means of @code{ASM_OUTPUT_LABEL}). @@ -6923,10 +7175,12 @@ 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}) +@item ASM_OUTPUT_EXTERNAL (@var{stream}, @var{name}, @var{decl}) A C statement (sans semicolon) to output to the stdio stream @var{stream} any text necessary for declaring the name of an external -symbol which is referenced in this compilation but not defined. +symbol named @var{name} which is referenced in this compilation but +not defined. The value of @var{decl} is the tree node for the +declaration. This macro need not be defined if it does not need to output anything. The GNU assembler and most Unix assemblers don't require anything. @@ -6938,6 +7192,14 @@ should be added to the front of the name 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}. + +This string, when output subsequently by @code{ASM_OUTPUT_LABELREF}, +should produce the same output that @code{ASM_OUTPUT_INTERNAL_LABEL} +would produce with the same @var{prefix} and @var{num}. + @item ASM_OUTPUT_INTERNAL_LABEL (@var{stream}, @var{prefix}, @var{num}) A C statement to output to the stdio stream @var{stream} a label whose name is made from the string @var{prefix} and the number @var{num}.