home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / gnu / gcc-2.5.8-bin.lha / info / gcc.info-22 (.txt) < prev    next >
GNU Info File  |  1994-02-21  |  23KB  |  418 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.55 from the input
  2. file gcc.texi.
  3.    This file documents the use and the internals of the GNU compiler.
  4.    Published by the Free Software Foundation 675 Massachusetts Avenue
  5. Cambridge, MA 02139 USA
  6.    Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc.
  7.    Permission is granted to make and distribute verbatim copies of this
  8. manual provided the copyright notice and this permission notice are
  9. preserved on all copies.
  10.    Permission is granted to copy and distribute modified versions of
  11. this manual under the conditions for verbatim copying, provided also
  12. that the sections entitled "GNU General Public License" and "Protect
  13. Your Freedom--Fight `Look And Feel'" are included exactly as in the
  14. original, and provided that the entire resulting derived work is
  15. distributed under the terms of a permission notice identical to this
  16.    Permission is granted to copy and distribute translations of this
  17. manual into another language, under the above conditions for modified
  18. versions, except that the sections entitled "GNU General Public
  19. License" and "Protect Your Freedom--Fight `Look And Feel'", and this
  20. permission notice, may be included in translations approved by the Free
  21. Software Foundation instead of in the original English.
  22. File: gcc.info,  Node: Misc,  Prev: Cross-compilation,  Up: Target Macros
  23. Miscellaneous Parameters
  24. ========================
  25. `PREDICATE_CODES'
  26.      Define this if you have defined special-purpose predicates in the
  27.      file `MACHINE.c'.  This macro is called within an initializer of an
  28.      array of structures.  The first field in the structure is the name
  29.      of a predicate and the second field is an array of rtl codes.  For
  30.      each predicate, list all rtl codes that can be in expressions
  31.      matched by the predicate.  The list should have a trailing comma.
  32.      Here is an example of two entries in the list for a typical RISC
  33.      machine:
  34.           #define PREDICATE_CODES \
  35.             {"gen_reg_rtx_operand", {SUBREG, REG}},  \
  36.             {"reg_or_short_cint_operand", {SUBREG, REG, CONST_INT}},
  37.      Defining this macro does not affect the generated code (however,
  38.      incorrect definitions that omit an rtl code that may be matched by
  39.      the predicate can cause the compiler to malfunction).  Instead, it
  40.      allows the table built by `genrecog' to be more compact and
  41.      efficient, thus speeding up the compiler.  The most important
  42.      predicates to include in the list specified by this macro are
  43.      thoses used in the most insn patterns.
  44. `CASE_VECTOR_MODE'
  45.      An alias for a machine mode name.  This is the machine mode that
  46.      elements of a jump-table should have.
  47. `CASE_VECTOR_PC_RELATIVE'
  48.      Define this macro if jump-tables should contain relative addresses.
  49. `CASE_DROPS_THROUGH'
  50.      Define this if control falls through a `case' insn when the index
  51.      value is out of range.  This means the specified default-label is
  52.      actually ignored by the `case' insn proper.
  53. `CASE_VALUES_THRESHOLD'
  54.      Define this to be the smallest number of different values for
  55.      which it is best to use a jump-table instead of a tree of
  56.      conditional branches.  The default is four for machines with a
  57.      `casesi' instruction and five otherwise.  This is best for most
  58.      machines.
  59. `WORD_REGISTER_OPERATIONS'
  60.      Define this macro if operations between registers with integral
  61.      mode smaller than a word are always performed on the entire
  62.      register.  Most RISC machines have this property and most CISC
  63.      machines do not.
  64. `LOAD_EXTEND_OP (MODE)'
  65.      Define this macro to be a C expression indicating when insns that
  66.      read memory in MODE, an integral mode narrower than a word, set the
  67.      bits outside of MODE to be either the sign-extension or the
  68.      zero-extension of the data read.  Return `SIGN_EXTEND' for values
  69.      of MODE for which the insn sign-extends, `ZERO_EXTEND' for which
  70.      it zero-extends, and `NIL' for other modes.
  71.      This macro is not called with MODE non-integral or with a width
  72.      greater than or equal to `BITS_PER_WORD', so you may return any
  73.      value in this case.  Do not define this macro if it would always
  74.      return `NIL'.  On machines where this macro is defined, you will
  75.      normally define it as the constant `SIGN_EXTEND' or `ZERO_EXTEND'.
  76. `IMPLICIT_FIX_EXPR'
  77.      An alias for a tree code that should be used by default for
  78.      conversion of floating point values to fixed point.  Normally,
  79.      `FIX_ROUND_EXPR' is used.
  80. `FIXUNS_TRUNC_LIKE_FIX_TRUNC'
  81.      Define this macro if the same instructions that convert a floating
  82.      point number to a signed fixed point number also convert validly
  83.      to an unsigned one.
  84. `EASY_DIV_EXPR'
  85.      An alias for a tree code that is the easiest kind of division to
  86.      compile code for in the general case.  It may be `TRUNC_DIV_EXPR',
  87.      `FLOOR_DIV_EXPR', `CEIL_DIV_EXPR' or `ROUND_DIV_EXPR'.  These four
  88.      division operators differ in how they round the result to an
  89.      integer.  `EASY_DIV_EXPR' is used when it is permissible to use
  90.      any of those kinds of division and the choice should be made on
  91.      the basis of efficiency.
  92. `MOVE_MAX'
  93.      The maximum number of bytes that a single instruction can move
  94.      quickly from memory to memory.
  95. `MAX_MOVE_MAX'
  96.      The maximum number of bytes that a single instruction can move
  97.      quickly from memory to memory.  If this is undefined, the default
  98.      is `MOVE_MAX'.  Otherwise, it is the constant value that is the
  99.      largest value that `MOVE_MAX' can have at run-time.
  100. `SHIFT_COUNT_TRUNCATED'
  101.      A C expression that is nonzero if on this machine the number of
  102.      bits actually used for the count of a shift operation is equal to
  103.      the number of bits needed to represent the size of the object
  104.      being shifted.  When this macro is non-zero, the compiler will
  105.      assume that it is safe to omit a sign-extend, zero-extend, and
  106.      certain bitwise `and' instructions that truncates the count of a
  107.      shift operation.  On machines that have instructions that act on
  108.      bitfields at variable positions, which may include `bit test'
  109.      instructions, a nonzero `SHIFT_COUNT_TRUNCATED' also enables
  110.      deletion of truncations of the values that serve as arguments to
  111.      bitfield instructions.
  112.      If both types of instructions truncate the count (for shifts) and
  113.      position (for bitfield operations), or if no variable-position
  114.      bitfield instructions exist, you should define this macro.
  115.      However, on some machines, such as the 80386 and the 680x0,
  116.      truncation only applies to shift operations and not the (real or
  117.      pretended) bitfield operations.  Define `SHIFT_COUNT_TRUNCATED' to
  118.      be zero on such machines.  Instead, add patterns to the `md' file
  119.      that include the implied truncation of the shift instructions.
  120.      You need not define this macro if it would always have the value
  121.      of zero.
  122. `TRULY_NOOP_TRUNCATION (OUTPREC, INPREC)'
  123.      A C expression which is nonzero if on this machine it is safe to
  124.      "convert" an integer of INPREC bits to one of OUTPREC bits (where
  125.      OUTPREC is smaller than INPREC) by merely operating on it as if it
  126.      had only OUTPREC bits.
  127.      On many machines, this expression can be 1.
  128.      When `TRULY_NOOP_TRUNCATION' returns 1 for a pair of sizes for
  129.      modes for which `MODES_TIEABLE_P' is 0, suboptimal code can result.
  130.      If this is the case, making `TRULY_NOOP_TRUNCATION' return 0 in
  131.      such cases may improve things.
  132. `STORE_FLAG_VALUE'
  133.      A C expression describing the value returned by a comparison
  134.      operator with an integral mode and stored by a store-flag
  135.      instruction (`sCOND') when the condition is true.  This
  136.      description must apply to *all* the `sCOND' patterns and all the
  137.      comparison operators whose results have a `MODE_INT' mode.
  138.      A value of 1 or -1 means that the instruction implementing the
  139.      comparison operator returns exactly 1 or -1 when the comparison is
  140.      true and 0 when the comparison is false.  Otherwise, the value
  141.      indicates which bits of the result are guaranteed to be 1 when the
  142.      comparison is true.  This value is interpreted in the mode of the
  143.      comparison operation, which is given by the mode of the first
  144.      operand in the `sCOND' pattern.  Either the low bit or the sign
  145.      bit of `STORE_FLAG_VALUE' be on.  Presently, only those bits are
  146.      used by the compiler.
  147.      If `STORE_FLAG_VALUE' is neither 1 or -1, the compiler will
  148.      generate code that depends only on the specified bits.  It can also
  149.      replace comparison operators with equivalent operations if they
  150.      cause the required bits to be set, even if the remaining bits are
  151.      undefined.  For example, on a machine whose comparison operators
  152.      return an `SImode' value and where `STORE_FLAG_VALUE' is defined as
  153.      `0x80000000', saying that just the sign bit is relevant, the
  154.      expression
  155.           (ne:SI (and:SI X (const_int POWER-OF-2)) (const_int 0))
  156.      can be converted to
  157.           (ashift:SI X (const_int N))
  158.      where N is the appropriate shift count to move the bit being
  159.      tested into the sign bit.
  160.      There is no way to describe a machine that always sets the
  161.      low-order bit for a true value, but does not guarantee the value
  162.      of any other bits, but we do not know of any machine that has such
  163.      an instruction.  If you are trying to port GNU CC to such a
  164.      machine, include an instruction to perform a logical-and of the
  165.      result with 1 in the pattern for the comparison operators and let
  166.      us know (*note How to Report Bugs: Bug Reporting.).
  167.      Often, a machine will have multiple instructions that obtain a
  168.      value from a comparison (or the condition codes).  Here are rules
  169.      to guide the choice of value for `STORE_FLAG_VALUE', and hence the
  170.      instructions to be used:
  171.         * Use the shortest sequence that yields a valid definition for
  172.           `STORE_FLAG_VALUE'.  It is more efficient for the compiler to
  173.           "normalize" the value (convert it to, e.g., 1 or 0) than for
  174.           the comparison operators to do so because there may be
  175.           opportunities to combine the normalization with other
  176.           operations.
  177.         * For equal-length sequences, use a value of 1 or -1, with -1
  178.           being slightly preferred on machines with expensive jumps and
  179.           1 preferred on other machines.
  180.         * As a second choice, choose a value of `0x80000001' if
  181.           instructions exist that set both the sign and low-order bits
  182.           but do not define the others.
  183.         * Otherwise, use a value of `0x80000000'.
  184.      Many machines can produce both the value chosen for
  185.      `STORE_FLAG_VALUE' and its negation in the same number of
  186.      instructions.  On those machines, you should also define a pattern
  187.      for those cases, e.g., one matching
  188.           (set A (neg:M (ne:M B C)))
  189.      Some machines can also perform `and' or `plus' operations on
  190.      condition code values with less instructions than the corresponding
  191.      `sCOND' insn followed by `and' or `plus'.  On those machines,
  192.      define the appropriate patterns.  Use the names `incscc' and
  193.      `decscc', respectively, for the the patterns which perform `plus'
  194.      or `minus' operations on condition code values.  See `rs6000.md'
  195.      for some examples.  The GNU Superoptizer can be used to find such
  196.      instruction sequences on other machines.
  197.      You need not define `STORE_FLAG_VALUE' if the machine has no
  198.      store-flag instructions.
  199. `FLOAT_STORE_FLAG_VALUE'
  200.      A C expression that gives a non-zero floating point value that is
  201.      returned when comparison operators with floating-point results are
  202.      true.  Define this macro on machine that have comparison
  203.      operations that return floating-point values.  If there are no
  204.      such operations, do not define this macro.
  205. `Pmode'
  206.      An alias for the machine mode for pointers.  Normally the
  207.      definition can be
  208.           #define Pmode SImode
  209. `FUNCTION_MODE'
  210.      An alias for the machine mode used for memory references to
  211.      functions being called, in `call' RTL expressions.  On most
  212.      machines this should be `QImode'.
  213. `INTEGRATE_THRESHOLD (DECL)'
  214.      A C expression for the maximum number of instructions above which
  215.      the function DECL should not be inlined.  DECL is a
  216.      `FUNCTION_DECL' node.
  217.      The default definition of this macro is 64 plus 8 times the number
  218.      of arguments that the function accepts.  Some people think a larger
  219.      threshold should be used on RISC machines.
  220. `SCCS_DIRECTIVE'
  221.      Define this if the preprocessor should ignore `#sccs' directives
  222.      and print no error message.
  223. `NO_IMPLICIT_EXTERN_C'
  224.      Define this macro if the system header files support C++ as well
  225.      as C.  This macro inhibits the usual method of using system header
  226.      files in C++, which is to pretend that the file's contents are
  227.      enclosed in `extern "C" {...}'.
  228. `HANDLE_PRAGMA (STREAM)'
  229.      Define this macro if you want to implement any pragmas.  If
  230.      defined, it should be a C statement to be executed when `#pragma'
  231.      is seen.  The argument STREAM is the stdio input stream from which
  232.      the source text can be read.
  233.      It is generally a bad idea to implement new uses of `#pragma'.  The
  234.      only reason to define this macro is for compatibility with other
  235.      compilers that do support `#pragma' for the sake of any user
  236.      programs which already use it.
  237. `DOLLARS_IN_IDENTIFIERS'
  238.      Define this macro to control use of the character `$' in identifier
  239.      names.  The value should be 0, 1, or 2.  0 means `$' is not allowed
  240.      by default; 1 means it is allowed by default if `-traditional' is
  241.      used; 2 means it is allowed by default provided `-ansi' is not
  242.      used.  1 is the default; there is no need to define this macro in
  243.      that case.
  244. `NO_DOLLAR_IN_LABEL'
  245.      Define this macro if the assembler does not accept the character
  246.      `$' in label names.  By default constructors and destructors in
  247.      G++ have `$' in the identifiers.  If this macro is defined, `.' is
  248.      used instead.
  249. `NO_DOT_IN_LABEL'
  250.      Define this macro if the assembler does not accept the character
  251.      `.' in label names.  By default constructors and destructors in G++
  252.      have names that use `.'.  If this macro is defined, these names
  253.      are rewritten to avoid `.'.
  254. `DEFAULT_MAIN_RETURN'
  255.      Define this macro if the target system expects every program's
  256.      `main' function to return a standard "success" value by default
  257.      (if no other value is explicitly returned).
  258.      The definition should be a C statement (sans semicolon) to
  259.      generate the appropriate rtl instructions.  It is used only when
  260.      compiling the end of `main'.
  261. `HAVE_ATEXIT'
  262.      Define this if the target system supports the function `atexit'
  263.      from the ANSI C standard.  If this is not defined, and
  264.      `INIT_SECTION_ASM_OP' is not defined, a default `exit' function
  265.      will be provided to support C++.
  266. `EXIT_BODY'
  267.      Define this if your `exit' function needs to do something besides
  268.      calling an external function `_cleanup' before terminating with
  269.      `_exit'.  The `EXIT_BODY' macro is only needed if netiher
  270.      `HAVE_ATEXIT' nor `INIT_SECTION_ASM_OP' are defined.
  271. `INSN_SETS_ARE_DELAYED (INSN)'
  272.      Define this macro as a C expression that is nonzero if it is safe
  273.      for the delay slot scheduler to place instructions in the delay
  274.      slot of INSN, even if they appear to use a resource set or
  275.      clobbered in INSN.  INSN is always a `jump_insn' or an `insn'; GNU
  276.      CC knows that every `call_insn' has this behavior.  On machines
  277.      where some `insn' or `jump_insn' is really a function call and
  278.      hence has this behavior, you should define this macro.
  279.      You need not define this macro if it would always return zero.
  280. `INSN_REFERENCES_ARE_DELAYED (INSN)'
  281.      Define this macro as a C expression that is nonzero if it is safe
  282.      for the delay slot scheduler to place instructions in the delay
  283.      slot of INSN, even if they appear to set or clobber a resource
  284.      referenced in INSN.  INSN is always a `jump_insn' or an `insn'.
  285.      On machines where some `insn' or `jump_insn' is really a function
  286.      call and its operands are registers whose use is actually in the
  287.      subroutine it calls, you should define this macro.  Doing so
  288.      allows the delay slot scheduler to move instructions which copy
  289.      arguments into the argument registers into the delay slot of INSN.
  290.      You need not define this macro if it would always return zero.
  291. File: gcc.info,  Node: Config,  Next: Index,  Prev: Target Macros,  Up: Top
  292. The Configuration File
  293. **********************
  294.    The configuration file `xm-MACHINE.h' contains macro definitions
  295. that describe the machine and system on which the compiler is running,
  296. unlike the definitions in `MACHINE.h', which describe the machine for
  297. which the compiler is producing output.  Most of the values in
  298. `xm-MACHINE.h' are actually the same on all machines that GNU CC runs
  299. on, so large parts of all configuration files are identical.  But there
  300. are some macros that vary:
  301. `USG'
  302.      Define this macro if the host system is System V.
  303. `VMS'
  304.      Define this macro if the host system is VMS.
  305. `FAILURE_EXIT_CODE'
  306.      A C expression for the status code to be returned when the compiler
  307.      exits after serious errors.
  308. `SUCCESS_EXIT_CODE'
  309.      A C expression for the status code to be returned when the compiler
  310.      exits without serious errors.
  311. `HOST_WORDS_BIG_ENDIAN'
  312.      Defined if the host machine stores words of multi-word values in
  313.      big-endian order.  (GNU CC does not depend on the host byte
  314.      ordering within a word.)
  315. `HOST_FLOAT_WORDS_BIG_ENDIAN'
  316.      Define this macro to be 1 if the host machine stores `DFmode',
  317.      `XFmode' or `TFmode' floating point numbers in memory with the
  318.      word containing the sign bit at the lowest address; otherwise,
  319.      define it to be zero.
  320.      This macro need not be defined if the ordering is the same as for
  321.      multi-word integers.
  322. `HOST_FLOAT_FORMAT'
  323.      A numeric code distinguishing the floating point format for the
  324.      host machine.  See `TARGET_FLOAT_FORMAT' in *Note Storage Layout::
  325.      for the alternatives and default.
  326. `HOST_BITS_PER_CHAR'
  327.      A C expression for the number of bits in `char' on the host
  328.      machine.
  329. `HOST_BITS_PER_SHORT'
  330.      A C expression for the number of bits in `short' on the host
  331.      machine.
  332. `HOST_BITS_PER_INT'
  333.      A C expression for the number of bits in `int' on the host machine.
  334. `HOST_BITS_PER_LONG'
  335.      A C expression for the number of bits in `long' on the host
  336.      machine.
  337. `ONLY_INT_FIELDS'
  338.      Define this macro to indicate that the host compiler only supports
  339.      `int' bit fields, rather than other integral types, including
  340.      `enum', as do most C compilers.
  341. `EXECUTABLE_SUFFIX'
  342.      Define this macro if the host system uses a naming convention for
  343.      executable files that involves a common suffix (such as, in some
  344.      systems, `.exe') that must be mentioned explicitly when you run
  345.      the program.
  346. `OBSTACK_CHUNK_SIZE'
  347.      A C expression for the size of ordinary obstack chunks.  If you
  348.      don't define this, a usually-reasonable default is used.
  349. `OBSTACK_CHUNK_ALLOC'
  350.      The function used to allocate obstack chunks.  If you don't define
  351.      this, `xmalloc' is used.
  352. `OBSTACK_CHUNK_FREE'
  353.      The function used to free obstack chunks.  If you don't define
  354.      this, `free' is used.
  355. `USE_C_ALLOCA'
  356.      Define this macro to indicate that the compiler is running with the
  357.      `alloca' implemented in C.  This version of `alloca' can be found
  358.      in the file `alloca.c'; to use it, you must also alter the
  359.      `Makefile' variable `ALLOCA'.  (This is done automatically for the
  360.      systems on which we know it is needed.)
  361.      If you do define this macro, you should probably do it as follows:
  362.           #ifndef __GNUC__
  363.           #define USE_C_ALLOCA
  364.           #else
  365.           #define alloca __builtin_alloca
  366.           #endif
  367.      so that when the compiler is compiled with GNU CC it uses the more
  368.      efficient built-in `alloca' function.
  369. `FUNCTION_CONVERSION_BUG'
  370.      Define this macro to indicate that the host compiler does not
  371.      properly handle converting a function value to a
  372.      pointer-to-function when it is used in an expression.
  373. `HAVE_VPRINTF'
  374.      Define this if the library function `vprintf' is available on your
  375.      system.
  376. `MULTIBYTE_CHARS'
  377.      Define this macro to enable support for multibyte characters in the
  378.      input to GNU CC.  This requires that the host system support the
  379.      ANSI C library functions for converting multibyte characters to
  380.      wide characters.
  381. `HAVE_PUTENV'
  382.      Define this if the library function `putenv' is available on your
  383.      system.
  384. `NO_SYS_SIGLIST'
  385.      Define this if your system *does not* provide the variable
  386.      `sys_siglist'.
  387. `USE_PROTOTYPES'
  388.      Define this to be 1 if you know that the host compiler supports
  389.      prototypes, even if it doesn't define __STDC__, or define it to be
  390.      0 if you do not want any prototypes used in compiling GNU CC.  If
  391.      `USE_PROTOTYPES' is not defined, it will be determined
  392.      automatically whether your compiler supports prototypes by
  393.      checking if `__STDC__' is defined.
  394. `NO_MD_PROTOTYPES'
  395.      Define this if you wish suppression of prototypes generated from
  396.      the machine description file, but to use other prototypes within
  397.      GNU CC.  If `USE_PROTOTYPES' is defined to be 0, or the host
  398.      compiler does not support prototypes, this macro has no effect.
  399. `MD_CALL_PROTOTYPES'
  400.      Define this if you wish to generate prototypes for the `gen_call'
  401.      or `gen_call_value' functions generated from the machine
  402.      description file.  If `USE_PROTOTYPES' is defined to be 0, or the
  403.      host compiler does not support prototypes, or `NO_MD_PROTOTYPES'
  404.      is defined, this macro has no effect.  As soon as all of the
  405.      machine descriptions are modified to have the appropriate number
  406.      of arguments, this macro will be removed.
  407.      Some systems do provide this variable, but with a different name
  408.      such as `_sys_siglist'.  On these systems, you can define
  409.      `sys_siglist' as a macro which expands into the name actually
  410.      provided.
  411. `NO_STAB_H'
  412.      Define this if your system does not have the include file
  413.      `stab.h'.  If `USG' is defined, `NO_STAB_H' is assumed.
  414.    In addition, configuration files for system V define `bcopy',
  415. `bzero' and `bcmp' as aliases.  Some files define `alloca' as a macro
  416. when compiled with GNU CC, in order to take advantage of the benefit of
  417. GNU CC's built-in `alloca'.
  418.