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-14 (.txt) < prev    next >
GNU Info File  |  1994-02-21  |  33KB  |  691 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: Output Statement,  Next: Constraints,  Prev: Output Template,  Up: Machine Desc
  23. C Statements for Assembler Output
  24. =================================
  25.    Often a single fixed template string cannot produce correct and
  26. efficient assembler code for all the cases that are recognized by a
  27. single instruction pattern.  For example, the opcodes may depend on the
  28. kinds of operands; or some unfortunate combinations of operands may
  29. require extra machine instructions.
  30.    If the output control string starts with a `@', then it is actually
  31. a series of templates, each on a separate line.  (Blank lines and
  32. leading spaces and tabs are ignored.)  The templates correspond to the
  33. pattern's constraint alternatives (*note Multi-Alternative::.).  For
  34. example, if a target machine has a two-address add instruction `addr'
  35. to add into a register and another `addm' to add a register to memory,
  36. you might write this pattern:
  37.      (define_insn "addsi3"
  38.        [(set (match_operand:SI 0 "general_operand" "=r,m")
  39.              (plus:SI (match_operand:SI 1 "general_operand" "0,0")
  40.                       (match_operand:SI 2 "general_operand" "g,r")))]
  41.        ""
  42.        "@
  43.         addr %2,%0
  44.         addm %2,%0")
  45.    If the output control string starts with a `*', then it is not an
  46. output template but rather a piece of C program that should compute a
  47. template.  It should execute a `return' statement to return the
  48. template-string you want.  Most such templates use C string literals,
  49. which require doublequote characters to delimit them.  To include these
  50. doublequote characters in the string, prefix each one with `\'.
  51.    The operands may be found in the array `operands', whose C data type
  52. is `rtx []'.
  53.    It is very common to select different ways of generating assembler
  54. code based on whether an immediate operand is within a certain range.
  55. Be careful when doing this, because the result of `INTVAL' is an
  56. integer on the host machine.  If the host machine has more bits in an
  57. `int' than the target machine has in the mode in which the constant
  58. will be used, then some of the bits you get from `INTVAL' will be
  59. superfluous.  For proper results, you must carefully disregard the
  60. values of those bits.
  61.    It is possible to output an assembler instruction and then go on to
  62. output or compute more of them, using the subroutine `output_asm_insn'.
  63. This receives two arguments: a template-string and a vector of
  64. operands.  The vector may be `operands', or it may be another array of
  65. `rtx' that you declare locally and initialize yourself.
  66.    When an insn pattern has multiple alternatives in its constraints,
  67. often the appearance of the assembler code is determined mostly by
  68. which alternative was matched.  When this is so, the C code can test
  69. the variable `which_alternative', which is the ordinal number of the
  70. alternative that was actually satisfied (0 for the first, 1 for the
  71. second alternative, etc.).
  72.    For example, suppose there are two opcodes for storing zero, `clrreg'
  73. for registers and `clrmem' for memory locations.  Here is how a pattern
  74. could use `which_alternative' to choose between them:
  75.      (define_insn ""
  76.        [(set (match_operand:SI 0 "general_operand" "=r,m")
  77.              (const_int 0))]
  78.        ""
  79.        "*
  80.        return (which_alternative == 0
  81.                ? \"clrreg %0\" : \"clrmem %0\");
  82.        ")
  83.    The example above, where the assembler code to generate was *solely*
  84. determined by the alternative, could also have been specified as
  85. follows, having the output control string start with a `@':
  86.      (define_insn ""
  87.        [(set (match_operand:SI 0 "general_operand" "=r,m")
  88.              (const_int 0))]
  89.        ""
  90.        "@
  91.         clrreg %0
  92.         clrmem %0")
  93. File: gcc.info,  Node: Constraints,  Next: Standard Names,  Prev: Output Statement,  Up: Machine Desc
  94. Operand Constraints
  95. ===================
  96.    Each `match_operand' in an instruction pattern can specify a
  97. constraint for the type of operands allowed.  Constraints can say
  98. whether an operand may be in a register, and which kinds of register;
  99. whether the operand can be a memory reference, and which kinds of
  100. address; whether the operand may be an immediate constant, and which
  101. possible values it may have.  Constraints can also require two operands
  102. to match.
  103. * Menu:
  104. * Simple Constraints::  Basic use of constraints.
  105. * Multi-Alternative::   When an insn has two alternative constraint-patterns.
  106. * Class Preferences::   Constraints guide which hard register to put things in.
  107. * Modifiers::           More precise control over effects of constraints.
  108. * Machine Constraints:: Existing constraints for some particular machines.
  109. * No Constraints::      Describing a clean machine without constraints.
  110. File: gcc.info,  Node: Simple Constraints,  Next: Multi-Alternative,  Up: Constraints
  111. Simple Constraints
  112. ------------------
  113.    The simplest kind of constraint is a string full of letters, each of
  114. which describes one kind of operand that is permitted.  Here are the
  115. letters that are allowed:
  116.      A memory operand is allowed, with any kind of address that the
  117.      machine supports in general.
  118.      A memory operand is allowed, but only if the address is
  119.      "offsettable".  This means that adding a small integer (actually,
  120.      the width in bytes of the operand, as determined by its machine
  121.      mode) may be added to the address and the result is also a valid
  122.      memory address.
  123.      For example, an address which is constant is offsettable; so is an
  124.      address that is the sum of a register and a constant (as long as a
  125.      slightly larger constant is also within the range of
  126.      address-offsets supported by the machine); but an autoincrement or
  127.      autodecrement address is not offsettable.  More complicated
  128.      indirect/indexed addresses may or may not be offsettable depending
  129.      on the other addressing modes that the machine supports.
  130.      Note that in an output operand which can be matched by another
  131.      operand, the constraint letter `o' is valid only when accompanied
  132.      by both `<' (if the target machine has predecrement addressing)
  133.      and `>' (if the target machine has preincrement addressing).
  134.      A memory operand that is not offsettable.  In other words,
  135.      anything that would fit the `m' constraint but not the `o'
  136.      constraint.
  137.      A memory operand with autodecrement addressing (either
  138.      predecrement or postdecrement) is allowed.
  139.      A memory operand with autoincrement addressing (either
  140.      preincrement or postincrement) is allowed.
  141.      A register operand is allowed provided that it is in a general
  142.      register.
  143. `d', `a', `f', ...
  144.      Other letters can be defined in machine-dependent fashion to stand
  145.      for particular classes of registers.  `d', `a' and `f' are defined
  146.      on the 68000/68020 to stand for data, address and floating point
  147.      registers.
  148.      An immediate integer operand (one with constant value) is allowed.
  149.      This includes symbolic constants whose values will be known only at
  150.      assembly time.
  151.      An immediate integer operand with a known numeric value is allowed.
  152.      Many systems cannot support assembly-time constants for operands
  153.      less than a word wide.  Constraints for these operands should use
  154.      `n' rather than `i'.
  155. `I', `J', `K', ... `P'
  156.      Other letters in the range `I' through `P' may be defined in a
  157.      machine-dependent fashion to permit immediate integer operands with
  158.      explicit integer values in specified ranges.  For example, on the
  159.      68000, `I' is defined to stand for the range of values 1 to 8.
  160.      This is the range permitted as a shift count in the shift
  161.      instructions.
  162.      An immediate floating operand (expression code `const_double') is
  163.      allowed, but only if the target floating point format is the same
  164.      as that of the host machine (on which the compiler is running).
  165.      An immediate floating operand (expression code `const_double') is
  166.      allowed.
  167. `G', `H'
  168.      `G' and `H' may be defined in a machine-dependent fashion to
  169.      permit immediate floating operands in particular ranges of values.
  170.      An immediate integer operand whose value is not an explicit
  171.      integer is allowed.
  172.      This might appear strange; if an insn allows a constant operand
  173.      with a value not known at compile time, it certainly must allow
  174.      any known value.  So why use `s' instead of `i'?  Sometimes it
  175.      allows better code to be generated.
  176.      For example, on the 68000 in a fullword instruction it is possible
  177.      to use an immediate operand; but if the immediate value is between
  178.      -128 and 127, better code results from loading the value into a
  179.      register and using the register.  This is because the load into
  180.      the register can be done with a `moveq' instruction.  We arrange
  181.      for this to happen by defining the letter `K' to mean "any integer
  182.      outside the range -128 to 127", and then specifying `Ks' in the
  183.      operand constraints.
  184.      Any register, memory or immediate integer operand is allowed,
  185.      except for registers that are not general registers.
  186.      Any operand whatsoever is allowed, even if it does not satisfy
  187.      `general_operand'.  This is normally used in the constraint of a
  188.      `match_scratch' when certain alternatives will not actually
  189.      require a scratch register.
  190. `0', `1', `2', ... `9'
  191.      An operand that matches the specified operand number is allowed.
  192.      If a digit is used together with letters within the same
  193.      alternative, the digit should come last.
  194.      This is called a "matching constraint" and what it really means is
  195.      that the assembler has only a single operand that fills two roles
  196.      considered separate in the RTL insn.  For example, an add insn has
  197.      two input operands and one output operand in the RTL, but on most
  198.      CISC machines an add instruction really has only two operands, one
  199.      of them an input-output operand:
  200.           addl #35,r12
  201.      Matching constraints are used in these circumstances.  More
  202.      precisely, the two operands that match must include one input-only
  203.      operand and one output-only operand.  Moreover, the digit must be a
  204.      smaller number than the number of the operand that uses it in the
  205.      constraint.
  206.      For operands to match in a particular case usually means that they
  207.      are identical-looking RTL expressions.  But in a few special cases
  208.      specific kinds of dissimilarity are allowed.  For example, `*x' as
  209.      an input operand will match `*x++' as an output operand.  For
  210.      proper results in such cases, the output template should always
  211.      use the output-operand's number when printing the operand.
  212.      An operand that is a valid memory address is allowed.  This is for
  213.      "load address" and "push address" instructions.
  214.      `p' in the constraint must be accompanied by `address_operand' as
  215.      the predicate in the `match_operand'.  This predicate interprets
  216.      the mode specified in the `match_operand' as the mode of the memory
  217.      reference for which the address would be valid.
  218. `Q', `R', `S', ... `U'
  219.      Letters in the range `Q' through `U' may be defined in a
  220.      machine-dependent fashion to stand for arbitrary operand types.
  221.      The machine description macro `EXTRA_CONSTRAINT' is passed the
  222.      operand as its first argument and the constraint letter as its
  223.      second operand.
  224.      A typical use for this would be to distinguish certain types of
  225.      memory references that affect other insn operands.
  226.      Do not define these constraint letters to accept register
  227.      references (`reg'); the reload pass does not expect this and would
  228.      not handle it properly.
  229.    In order to have valid assembler code, each operand must satisfy its
  230. constraint.  But a failure to do so does not prevent the pattern from
  231. applying to an insn.  Instead, it directs the compiler to modify the
  232. code so that the constraint will be satisfied.  Usually this is done by
  233. copying an operand into a register.
  234.    Contrast, therefore, the two instruction patterns that follow:
  235.      (define_insn ""
  236.        [(set (match_operand:SI 0 "general_operand" "=r")
  237.              (plus:SI (match_dup 0)
  238.                       (match_operand:SI 1 "general_operand" "r")))]
  239.        ""
  240.        "...")
  241. which has two operands, one of which must appear in two places, and
  242.      (define_insn ""
  243.        [(set (match_operand:SI 0 "general_operand" "=r")
  244.              (plus:SI (match_operand:SI 1 "general_operand" "0")
  245.                       (match_operand:SI 2 "general_operand" "r")))]
  246.        ""
  247.        "...")
  248. which has three operands, two of which are required by a constraint to
  249. be identical.  If we are considering an insn of the form
  250.      (insn N PREV NEXT
  251.        (set (reg:SI 3)
  252.             (plus:SI (reg:SI 6) (reg:SI 109)))
  253.        ...)
  254. the first pattern would not apply at all, because this insn does not
  255. contain two identical subexpressions in the right place.  The pattern
  256. would say, "That does not look like an add instruction; try other
  257. patterns." The second pattern would say, "Yes, that's an add
  258. instruction, but there is something wrong with it."  It would direct
  259. the reload pass of the compiler to generate additional insns to make
  260. the constraint true.  The results might look like this:
  261.      (insn N2 PREV N
  262.        (set (reg:SI 3) (reg:SI 6))
  263.        ...)
  264.      
  265.      (insn N N2 NEXT
  266.        (set (reg:SI 3)
  267.             (plus:SI (reg:SI 3) (reg:SI 109)))
  268.        ...)
  269.    It is up to you to make sure that each operand, in each pattern, has
  270. constraints that can handle any RTL expression that could be present for
  271. that operand.  (When multiple alternatives are in use, each pattern
  272. must, for each possible combination of operand expressions, have at
  273. least one alternative which can handle that combination of operands.)
  274. The constraints don't need to *allow* any possible operand--when this is
  275. the case, they do not constrain--but they must at least point the way to
  276. reloading any possible operand so that it will fit.
  277.    * If the constraint accepts whatever operands the predicate permits,
  278.      there is no problem: reloading is never necessary for this operand.
  279.      For example, an operand whose constraints permit everything except
  280.      registers is safe provided its predicate rejects registers.
  281.      An operand whose predicate accepts only constant values is safe
  282.      provided its constraints include the letter `i'.  If any possible
  283.      constant value is accepted, then nothing less than `i' will do; if
  284.      the predicate is more selective, then the constraints may also be
  285.      more selective.
  286.    * Any operand expression can be reloaded by copying it into a
  287.      register.  So if an operand's constraints allow some kind of
  288.      register, it is certain to be safe.  It need not permit all
  289.      classes of registers; the compiler knows how to copy a register
  290.      into another register of the proper class in order to make an
  291.      instruction valid.
  292.    * A nonoffsettable memory reference can be reloaded by copying the
  293.      address into a register.  So if the constraint uses the letter
  294.      `o', all memory references are taken care of.
  295.    * A constant operand can be reloaded by allocating space in memory to
  296.      hold it as preinitialized data.  Then the memory reference can be
  297.      used in place of the constant.  So if the constraint uses the
  298.      letters `o' or `m', constant operands are not a problem.
  299.    * If the constraint permits a constant and a pseudo register used in
  300.      an insn was not allocated to a hard register and is equivalent to
  301.      a constant, the register will be replaced with the constant.  If
  302.      the predicate does not permit a constant and the insn is
  303.      re-recognized for some reason, the compiler will crash.  Thus the
  304.      predicate must always recognize any objects allowed by the
  305.      constraint.
  306.    If the operand's predicate can recognize registers, but the
  307. constraint does not permit them, it can make the compiler crash.  When
  308. this operand happens to be a register, the reload pass will be stymied,
  309. because it does not know how to copy a register temporarily into memory.
  310. File: gcc.info,  Node: Multi-Alternative,  Next: Class Preferences,  Prev: Simple Constraints,  Up: Constraints
  311. Multiple Alternative Constraints
  312. --------------------------------
  313.    Sometimes a single instruction has multiple alternative sets of
  314. possible operands.  For example, on the 68000, a logical-or instruction
  315. can combine register or an immediate value into memory, or it can
  316. combine any kind of operand into a register; but it cannot combine one
  317. memory location into another.
  318.    These constraints are represented as multiple alternatives.  An
  319. alternative can be described by a series of letters for each operand.
  320. The overall constraint for an operand is made from the letters for this
  321. operand from the first alternative, a comma, the letters for this
  322. operand from the second alternative, a comma, and so on until the last
  323. alternative.  Here is how it is done for fullword logical-or on the
  324. 68000:
  325.      (define_insn "iorsi3"
  326.        [(set (match_operand:SI 0 "general_operand" "=m,d")
  327.              (ior:SI (match_operand:SI 1 "general_operand" "%0,0")
  328.                      (match_operand:SI 2 "general_operand" "dKs,dmKs")))]
  329.        ...)
  330.    The first alternative has `m' (memory) for operand 0, `0' for
  331. operand 1 (meaning it must match operand 0), and `dKs' for operand 2.
  332. The second alternative has `d' (data register) for operand 0, `0' for
  333. operand 1, and `dmKs' for operand 2.  The `=' and `%' in the
  334. constraints apply to all the alternatives; their meaning is explained
  335. in the next section (*note Class Preferences::.).
  336.    If all the operands fit any one alternative, the instruction is
  337. valid.  Otherwise, for each alternative, the compiler counts how many
  338. instructions must be added to copy the operands so that that
  339. alternative applies.  The alternative requiring the least copying is
  340. chosen.  If two alternatives need the same amount of copying, the one
  341. that comes first is chosen.  These choices can be altered with the `?'
  342. and `!' characters:
  343.      Disparage slightly the alternative that the `?' appears in, as a
  344.      choice when no alternative applies exactly.  The compiler regards
  345.      this alternative as one unit more costly for each `?' that appears
  346.      in it.
  347.      Disparage severely the alternative that the `!' appears in.  This
  348.      alternative can still be used if it fits without reloading, but if
  349.      reloading is needed, some other alternative will be used.
  350.    When an insn pattern has multiple alternatives in its constraints,
  351. often the appearance of the assembler code is determined mostly by which
  352. alternative was matched.  When this is so, the C code for writing the
  353. assembler code can use the variable `which_alternative', which is the
  354. ordinal number of the alternative that was actually satisfied (0 for
  355. the first, 1 for the second alternative, etc.).  *Note Output
  356. Statement::.
  357. File: gcc.info,  Node: Class Preferences,  Next: Modifiers,  Prev: Multi-Alternative,  Up: Constraints
  358. Register Class Preferences
  359. --------------------------
  360.    The operand constraints have another function: they enable the
  361. compiler to decide which kind of hardware register a pseudo register is
  362. best allocated to.  The compiler examines the constraints that apply to
  363. the insns that use the pseudo register, looking for the
  364. machine-dependent letters such as `d' and `a' that specify classes of
  365. registers.  The pseudo register is put in whichever class gets the most
  366. "votes".  The constraint letters `g' and `r' also vote: they vote in
  367. favor of a general register.  The machine description says which
  368. registers are considered general.
  369.    Of course, on some machines all registers are equivalent, and no
  370. register classes are defined.  Then none of this complexity is relevant.
  371. File: gcc.info,  Node: Modifiers,  Next: Machine Constraints,  Prev: Class Preferences,  Up: Constraints
  372. Constraint Modifier Characters
  373. ------------------------------
  374.      Means that this operand is write-only for this instruction: the
  375.      previous value is discarded and replaced by output data.
  376.      Means that this operand is both read and written by the
  377.      instruction.
  378.      When the compiler fixes up the operands to satisfy the constraints,
  379.      it needs to know which operands are inputs to the instruction and
  380.      which are outputs from it.  `=' identifies an output; `+'
  381.      identifies an operand that is both input and output; all other
  382.      operands are assumed to be input only.
  383.      Means (in a particular alternative) that this operand is written
  384.      before the instruction is finished using the input operands.
  385.      Therefore, this operand may not lie in a register that is used as
  386.      an input operand or as part of any memory address.
  387.      `&' applies only to the alternative in which it is written.  In
  388.      constraints with multiple alternatives, sometimes one alternative
  389.      requires `&' while others do not.  See, for example, the `movdf'
  390.      insn of the 68000.
  391.      `&' does not obviate the need to write `='.
  392.      Declares the instruction to be commutative for this operand and the
  393.      following operand.  This means that the compiler may interchange
  394.      the two operands if that is the cheapest way to make all operands
  395.      fit the constraints.  This is often used in patterns for addition
  396.      instructions that really have only two operands: the result must
  397.      go in one of the arguments.  Here for example, is how the 68000
  398.      halfword-add instruction is defined:
  399.           (define_insn "addhi3"
  400.             [(set (match_operand:HI 0 "general_operand" "=m,r")
  401.                (plus:HI (match_operand:HI 1 "general_operand" "%0,0")
  402.                         (match_operand:HI 2 "general_operand" "di,g")))]
  403.             ...)
  404.      Says that all following characters, up to the next comma, are to be
  405.      ignored as a constraint.  They are significant only for choosing
  406.      register preferences.
  407.      Says that the following character should be ignored when choosing
  408.      register preferences.  `*' has no effect on the meaning of the
  409.      constraint as a constraint, and no effect on reloading.
  410.      Here is an example: the 68000 has an instruction to sign-extend a
  411.      halfword in a data register, and can also sign-extend a value by
  412.      copying it into an address register.  While either kind of
  413.      register is acceptable, the constraints on an address-register
  414.      destination are less strict, so it is best if register allocation
  415.      makes an address register its goal.  Therefore, `*' is used so
  416.      that the `d' constraint letter (for data register) is ignored when
  417.      computing register preferences.
  418.           (define_insn "extendhisi2"
  419.             [(set (match_operand:SI 0 "general_operand" "=*d,a")
  420.                   (sign_extend:SI
  421.                    (match_operand:HI 1 "general_operand" "0,g")))]
  422.             ...)
  423. File: gcc.info,  Node: Machine Constraints,  Next: No Constraints,  Prev: Modifiers,  Up: Constraints
  424. Constraints for Particular Machines
  425. -----------------------------------
  426.    Whenever possible, you should use the general-purpose constraint
  427. letters in `asm' arguments, since they will convey meaning more readily
  428. to people reading your code.  Failing that, use the constraint letters
  429. that usually have very similar meanings across architectures.  The most
  430. commonly used constraints are `m' and `r' (for memory and
  431. general-purpose registers respectively; *note Simple Constraints::.),
  432. and `I', usually the letter indicating the most common
  433. immediate-constant format.
  434.    For each machine architecture, the `config/MACHINE.h' file defines
  435. additional constraints.  These constraints are used by the compiler
  436. itself for instruction generation, as well as for `asm' statements;
  437. therefore, some of the constraints are not particularly interesting for
  438. `asm'.  The constraints are defined through these macros:
  439. `REG_CLASS_FROM_LETTER'
  440.      Register class constraints (usually lower case).
  441. `CONST_OK_FOR_LETTER_P'
  442.      Immediate constant constraints, for non-floating point constants of
  443.      word size or smaller precision (usually upper case).
  444. `CONST_DOUBLE_OK_FOR_LETTER_P'
  445.      Immediate constant constraints, for all floating point constants
  446.      and for constants of greater than word size precision (usually
  447.      upper case).
  448. `EXTRA_CONSTRAINT'
  449.      Special cases of registers or memory.  This macro is not required,
  450.      and is only defined for some machines.
  451.    Inspecting these macro definitions in the compiler source for your
  452. machine is the best way to be certain you have the right constraints.
  453. However, here is a summary of the machine-dependent constraints
  454. available on some particular machines.
  455. *AMD 29000 family--`a29k.h'*
  456.     `l'
  457.           Local register 0
  458.     `b'
  459.           Byte Pointer (`BP') register
  460.     `q'
  461.           `Q' register
  462.     `h'
  463.           Special purpose register
  464.     `A'
  465.           First accumulator register
  466.     `a'
  467.           Other accumulator register
  468.     `f'
  469.           Floating point register
  470.     `I'
  471.           Constant greater than 0, less than 0x100
  472.     `J'
  473.           Constant greater than 0, less than 0x10000
  474.     `K'
  475.           Constant whose high 24 bits are on (1)
  476.     `L'
  477.           16 bit constant whose high 8 bits are on (1)
  478.     `M'
  479.           32 bit constant whose high 16 bits are on (1)
  480.     `N'
  481.           32 bit negative constant that fits in 8 bits
  482.     `O'
  483.           The constant 0x80000000 or, on the 29050, any 32 bit constant
  484.           whose low 16 bits are 0.
  485.     `P'
  486.           16 bit negative constant that fits in 8 bits
  487.     `G'
  488.     `H'
  489.           A floating point constant (in `asm' statements, use the
  490.           machine independent `E' or `F' instead)
  491. *IBM RS6000--`rs6000.h'*
  492.     `b'
  493.           Address base register
  494.     `f'
  495.           Floating point register
  496.     `h'
  497.           `MQ', `CTR', or `LINK' register
  498.     `q'
  499.           `MQ' register
  500.     `c'
  501.           `CTR' register
  502.     `l'
  503.           `LINK' register
  504.     `x'
  505.           `CR' register (condition register) number 0
  506.     `y'
  507.           `CR' register (condition register)
  508.     `I'
  509.           Signed 16 bit constant
  510.     `J'
  511.           Constant whose low 16 bits are 0
  512.     `K'
  513.           Constant whose high 16 bits are 0
  514.     `L'
  515.           Constant suitable as a mask operand
  516.     `M'
  517.           Constant larger than 31
  518.     `N'
  519.           Exact power of 2
  520.     `O'
  521.           Zero
  522.     `P'
  523.           Constant whose negation is a signed 16 bit constant
  524.     `G'
  525.           Floating point constant that can be loaded into a register
  526.           with one instruction per word
  527.     `Q'
  528.           Memory operand that is an offset from a register (`m' is
  529.           preferable for `asm' statements)
  530. *Intel 386--`i386.h'*
  531.     `q'
  532.           `a', `b', `c', or `d' register
  533.     `f'
  534.           Floating point register
  535.     `t'
  536.           First (top of stack) floating point register
  537.     `u'
  538.           Second floating point register
  539.     `a'
  540.           `a' register
  541.     `b'
  542.           `b' register
  543.     `c'
  544.           `c' register
  545.     `d'
  546.           `d' register
  547.     `D'
  548.           `di' register
  549.     `S'
  550.           `si' register
  551.     `I'
  552.           Constant in range 0 to 31 (for 32 bit shifts)
  553.     `J'
  554.           Constant in range 0 to 63 (for 64 bit shifts)
  555.     `K'
  556.           `0xff'
  557.     `L'
  558.           `0xffff'
  559.     `M'
  560.           0, 1, 2, or 3 (shifts for `lea' instruction)
  561.     `G'
  562.           Standard 80387 floating point constant
  563. *Intel 960--`i960.h'*
  564.     `f'
  565.           Floating point register (`fp0' to `fp3')
  566.     `l'
  567.           Local register (`r0' to `r15')
  568.     `b'
  569.           Global register (`g0' to `g15')
  570.     `d'
  571.           Any local or global register
  572.     `I'
  573.           Integers from 0 to 31
  574.     `J'
  575.           0
  576.     `K'
  577.           Integers from -31 to 0
  578.     `G'
  579.           Floating point 0
  580.     `H'
  581.           Floating point 1
  582. *MIPS--`mips.h'*
  583.     `d'
  584.           General-purpose integer register
  585.     `f'
  586.           Floating-point register (if available)
  587.     `h'
  588.           `Hi' register
  589.     `l'
  590.           `Lo' register
  591.     `x'
  592.           `Hi' or `Lo' register
  593.     `y'
  594.           General-purpose integer register
  595.     `z'
  596.           Floating-point status register
  597.     `I'
  598.           Signed 16 bit constant (for arithmetic instructions)
  599.     `J'
  600.           Zero
  601.     `K'
  602.           Zero-extended 16-bit constant (for logic instructions)
  603.     `L'
  604.           Constant with low 16 bits zero (can be loaded with `lui')
  605.     `M'
  606.           32 bit constant which requires two instructions to load (a
  607.           constant which is not `I', `K', or `L')
  608.     `N'
  609.           Negative 16 bit constant
  610.     `O'
  611.           Exact power of two
  612.     `P'
  613.           Positive 16 bit constant
  614.     `G'
  615.           Floating point zero
  616.     `Q'
  617.           Memory reference that can be loaded with more than one
  618.           instruction (`m' is preferable for `asm' statements)
  619.     `R'
  620.           Memory reference that can be loaded with one instruction (`m'
  621.           is preferable for `asm' statements)
  622.     `S'
  623.           Memory reference in external OSF/rose PIC format (`m' is
  624.           preferable for `asm' statements)
  625. *Motorola 680x0--`m68k.h'*
  626.     `a'
  627.           Address register
  628.     `d'
  629.           Data register
  630.     `f'
  631.           68881 floating-point register, if available
  632.     `x'
  633.           Sun FPA (floating-point) register, if available
  634.     `y'
  635.           First 16 Sun FPA registers, if available
  636.     `I'
  637.           Integer in the range 1 to 8
  638.     `J'
  639.           16 bit signed number
  640.     `K'
  641.           Signed number whose magnitude is greater than 0x80
  642.     `L'
  643.           Integer in the range -8 to -1
  644.     `G'
  645.           Floating point constant that is not a 68881 constant
  646.     `H'
  647.           Floating point constant that can be used by Sun FPA
  648. *SPARC--`sparc.h'*
  649.     `f'
  650.           Floating-point register
  651.     `I'
  652.           Signed 13 bit constant
  653.     `J'
  654.           Zero
  655.     `K'
  656.           32 bit constant with the low 12 bits clear (a constant that
  657.           can be loaded with the `sethi' instruction)
  658.     `G'
  659.           Floating-point zero
  660.     `H'
  661.           Signed 13 bit constant, sign-extended to 32 or 64 bits
  662.     `Q'
  663.           Memory reference that can be loaded with one instruction
  664.           (`m' is more appropriate for `asm' statements)
  665.     `S'
  666.           Constant, or memory address
  667.     `T'
  668.           Memory address aligned to an 8-byte boundary
  669.     `U'
  670.           Even register
  671. File: gcc.info,  Node: No Constraints,  Prev: Machine Constraints,  Up: Constraints
  672. Not Using Constraints
  673. ---------------------
  674.    Some machines are so clean that operand constraints are not
  675. required.  For example, on the Vax, an operand valid in one context is
  676. valid in any other context.  On such a machine, every operand
  677. constraint would be `g', excepting only operands of "load address"
  678. instructions which are written as if they referred to a memory
  679. location's contents but actual refer to its address.  They would have
  680. constraint `p'.
  681.    For such machines, instead of writing `g' and `p' for all the
  682. constraints, you can choose to write a description with empty
  683. constraints.  Then you write `""' for the constraint in every
  684. `match_operand'.  Address operands are identified by writing an
  685. `address' expression around the `match_operand', not by their
  686. constraints.
  687.    When the machine description has just empty constraints, certain
  688. parts of compilation are skipped, making the compiler faster.  However,
  689. few machines actually do not need constraints; all machine descriptions
  690. now in existence use constraints.
  691.