home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / msdos / djgpp / docs / gcc / gcc.i12 < prev    next >
Encoding:
GNU Info File  |  1993-05-29  |  47.7 KB  |  1,269 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.54 from the input
  2. file gcc.texi.
  3.  
  4.    This file documents the use and the internals of the GNU compiler.
  5.  
  6.    Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc.
  7.  
  8.    Permission is granted to make and distribute verbatim copies of this
  9. manual provided the copyright notice and this permission notice are
  10. preserved on all copies.
  11.  
  12.    Permission is granted to copy and distribute modified versions of
  13. this manual under the conditions for verbatim copying, provided also
  14. that the sections entitled "GNU General Public License" and "Protect
  15. Your Freedom--Fight `Look And Feel'" are included exactly as in the
  16. original, and provided that the entire resulting derived work is
  17. distributed under the terms of a permission notice identical to this
  18. one.
  19.  
  20.    Permission is granted to copy and distribute translations of this
  21. manual into another language, under the above conditions for modified
  22. versions, except that the sections entitled "GNU General Public
  23. License" and "Protect Your Freedom--Fight `Look And Feel'", and this
  24. permission notice, may be included in translations approved by the Free
  25. Software Foundation instead of in the original English.
  26.  
  27. 
  28. File: gcc.info,  Node: RTL Template,  Next: Output Template,  Prev: Example,  Up: Machine Desc
  29.  
  30. RTL Template for Generating and Recognizing Insns
  31. =================================================
  32.  
  33.    The RTL template is used to define which insns match the particular
  34. pattern and how to find their operands.  For named patterns, the RTL
  35. template also says how to construct an insn from specified operands.
  36.  
  37.    Construction involves substituting specified operands into a copy of
  38. the template.  Matching involves determining the values that serve as
  39. the operands in the insn being matched.  Both of these activities are
  40. controlled by special expression types that direct matching and
  41. substitution of the operands.
  42.  
  43. `(match_operand:M N PREDICATE CONSTRAINT)'
  44.      This expression is a placeholder for operand number N of the insn.
  45.      When constructing an insn, operand number N will be substituted
  46.      at this point.  When matching an insn, whatever appears at this
  47.      position in the insn will be taken as operand number N; but it
  48.      must satisfy PREDICATE or this instruction pattern will not match
  49.      at all.
  50.  
  51.      Operand numbers must be chosen consecutively counting from zero in
  52.      each instruction pattern.  There may be only one `match_operand'
  53.      expression in the pattern for each operand number.  Usually
  54.      operands are numbered in the order of appearance in `match_operand'
  55.      expressions.
  56.  
  57.      PREDICATE is a string that is the name of a C function that
  58.      accepts two arguments, an expression and a machine mode.  During
  59.      matching, the function will be called with the putative operand as
  60.      the expression and M as the mode argument (if M is not specified,
  61.      `VOIDmode' will be used, which normally causes PREDICATE to accept
  62.      any mode).  If it returns zero, this instruction pattern fails to
  63.      match.  PREDICATE may be an empty string; then it means no test is
  64.      to be done on the operand, so anything which occurs in this
  65.      position is valid.
  66.  
  67.      Most of the time, PREDICATE will reject modes other than M--but
  68.      not always.  For example, the predicate `address_operand' uses M
  69.      as the mode of memory ref that the address should be valid for.
  70.      Many predicates accept `const_int' nodes even though their mode is
  71.      `VOIDmode'.
  72.  
  73.      CONSTRAINT controls reloading and the choice of the best register
  74.      class to use for a value, as explained later (*note
  75.      Constraints::.).
  76.  
  77.      People are often unclear on the difference between the constraint
  78.      and the predicate.  The predicate helps decide whether a given
  79.      insn matches the pattern.  The constraint plays no role in this
  80.      decision; instead, it controls various decisions in the case of an
  81.      insn which does match.
  82.  
  83.      On CISC machines, PREDICATE is most often `"general_operand"'.
  84.      This function checks that the putative operand is either a
  85.      constant, a register or a memory reference, and that it is valid
  86.      for mode M.
  87.  
  88.      For an operand that must be a register, PREDICATE should be
  89.      `"register_operand"'.  Using `"general_operand"' would be valid,
  90.      since the reload pass would copy any non-register operands through
  91.      registers, but this would make GNU CC do extra work, it would
  92.      prevent invariant operands (such as constant) from being removed
  93.      from loops, and it would prevent the register allocator from doing
  94.      the best possible job.  On RISC machines, it is usually most
  95.      efficient to allow PREDICATE to accept only objects that the
  96.      constraints allow.
  97.  
  98.      For an operand that must be a constant, you must be sure to either
  99.      use `"immediate_operand"' for PREDICATE, or make the instruction
  100.      pattern's extra condition require a constant, or both.  You cannot
  101.      expect the constraints to do this work!  If the constraints allow
  102.      only constants, but the predicate allows something else, the
  103.      compiler will crash when that case arises.
  104.  
  105. `(match_scratch:M N CONSTRAINT)'
  106.      This expression is also a placeholder for operand number N and
  107.      indicates that operand must be a `scratch' or `reg' expression.
  108.  
  109.      When matching patterns, this is completely equivalent to
  110.  
  111.           (match_operand:M N "scratch_operand" PRED)
  112.  
  113.      but, when generating RTL, it produces a (`scratch':M) expression.
  114.  
  115.      If the last few expressions in a `parallel' are `clobber'
  116.      expressions whose operands are either a hard register or
  117.      `match_scratch', the combiner can add them when necessary.  *Note
  118.      Side Effects::.
  119.  
  120. `(match_dup N)'
  121.      This expression is also a placeholder for operand number N.  It is
  122.      used when the operand needs to appear more than once in the insn.
  123.  
  124.      In construction, `match_dup' behaves exactly like `match_operand':
  125.      the operand is substituted into the insn being constructed.  But
  126.      in matching, `match_dup' behaves differently.  It assumes that
  127.      operand number N has already been determined by a `match_operand'
  128.      appearing earlier in the recognition template, and it matches only
  129.      an identical-looking expression.
  130.  
  131. `(match_operator:M N PREDICATE [OPERANDS...])'
  132.      This pattern is a kind of placeholder for a variable RTL expression
  133.      code.
  134.  
  135.      When constructing an insn, it stands for an RTL expression whose
  136.      expression code is taken from that of operand N, and whose
  137.      operands are constructed from the patterns OPERANDS.
  138.  
  139.      When matching an expression, it matches an expression if the
  140.      function PREDICATE returns nonzero on that expression *and* the
  141.      patterns OPERANDS match the operands of the expression.
  142.  
  143.      Suppose that the function `commutative_operator' is defined as
  144.      follows, to match any expression whose operator is one of the
  145.      commutative arithmetic operators of RTL and whose mode is MODE:
  146.  
  147.           int
  148.           commutative_operator (x, mode)
  149.                rtx x;
  150.                enum machine_mode mode;
  151.           {
  152.             enum rtx_code code = GET_CODE (x);
  153.             if (GET_MODE (x) != mode)
  154.               return 0;
  155.             return (GET_RTX_CLASS (code) == 'c'
  156.                     || code == EQ || code == NE);
  157.           }
  158.  
  159.      Then the following pattern will match any RTL expression consisting
  160.      of a commutative operator applied to two general operands:
  161.  
  162.           (match_operator:SI 3 "commutative_operator"
  163.             [(match_operand:SI 1 "general_operand" "g")
  164.              (match_operand:SI 2 "general_operand" "g")])
  165.  
  166.      Here the vector `[OPERANDS...]' contains two patterns because the
  167.      expressions to be matched all contain two operands.
  168.  
  169.      When this pattern does match, the two operands of the commutative
  170.      operator are recorded as operands 1 and 2 of the insn.  (This is
  171.      done by the two instances of `match_operand'.)  Operand 3 of the
  172.      insn will be the entire commutative expression: use `GET_CODE
  173.      (operands[3])' to see which commutative operator was used.
  174.  
  175.      The machine mode M of `match_operator' works like that of
  176.      `match_operand': it is passed as the second argument to the
  177.      predicate function, and that function is solely responsible for
  178.      deciding whether the expression to be matched "has" that mode.
  179.  
  180.      When constructing an insn, argument 3 of the gen-function will
  181.      specify the operation (i.e. the expression code) for the
  182.      expression to be made.  It should be an RTL expression, whose
  183.      expression code is copied into a new expression whose operands are
  184.      arguments 1 and 2 of the gen-function.  The subexpressions of
  185.      argument 3 are not used; only its expression code matters.
  186.  
  187.      When `match_operator' is used in a pattern for matching an insn,
  188.      it usually best if the operand number of the `match_operator' is
  189.      higher than that of the actual operands of the insn.  This improves
  190.      register allocation because the register allocator often looks at
  191.      operands 1 and 2 of insns to see if it can do register tying.
  192.  
  193.      There is no way to specify constraints in `match_operator'.  The
  194.      operand of the insn which corresponds to the `match_operator'
  195.      never has any constraints because it is never reloaded as a whole.
  196.      However, if parts of its OPERANDS are matched by `match_operand'
  197.      patterns, those parts may have constraints of their own.
  198.  
  199. `(match_op_dup:M N[OPERANDS...])'
  200.      Like `match_dup', except that it applies to operators instead of
  201.      operands.  When constructing an insn, operand number N will be
  202.      substituted at this point.  But in matching, `match_op_dup' behaves
  203.      differently.  It assumes that operand number N has already been
  204.      determined by a `match_operator' appearing earlier in the
  205.      recognition template, and it matches only an identical-looking
  206.      expression.
  207.  
  208. `(match_parallel N PREDICATE [SUBPAT...])'
  209.      This pattern is a placeholder for an insn that consists of a
  210.      `parallel' expression with a variable number of elements.  This
  211.      expression should only appear at the top level of an insn pattern.
  212.  
  213.      When constructing an insn, operand number N will be substituted at
  214.      this point.  When matching an insn, it matches if the body of the
  215.      insn is a `parallel' expression with at least as many elements as
  216.      the vector of SUBPAT expressions in the `match_parallel', if each
  217.      SUBPAT matches the corresponding element of the `parallel', *and*
  218.      the function PREDICATE returns nonzero on the `parallel' that is
  219.      the body of the insn.  It is the responsibility of the predicate
  220.      to validate elements of the `parallel' beyond those listed in the
  221.      `match_parallel'.
  222.  
  223.      A typical use of `match_parallel' is to match load and store
  224.      multiple expressions, which can contains a variable number of
  225.      elements in a `parallel'.  For example,
  226.  
  227.           (define_insn ""
  228.             [(match_parallel 0 "load_multiple_operation"
  229.                [(set (match_operand:SI 1 "gpc_reg_operand" "=r")
  230.                      (match_operand:SI 2 "memory_operand" "m"))
  231.                 (use (reg:SI 179))
  232.                 (clobber (reg:SI 179))])]
  233.             ""
  234.             "loadm 0,0,%1,%2")
  235.  
  236.      This example comes from `a29k.md'.  The function
  237.      `load_multiple_operations' is defined in `a29k.c' and checks that
  238.      subsequent elements in the `parallel' are the same as the `set' in
  239.      the pattern, except that they are referencing subsequent registers
  240.      and memory locations.
  241.  
  242.      An insn that matches this pattern might look like:
  243.  
  244.           (parallel
  245.            [(set (reg:SI 20) (mem:SI (reg:SI 100)))
  246.             (use (reg:SI 179))
  247.             (clobber (reg:SI 179))
  248.             (set (reg:SI 21)
  249.                  (mem:SI (plus:SI (reg:SI 100)
  250.                                   (const_int 4))))
  251.             (set (reg:SI 22)
  252.                  (mem:SI (plus:SI (reg:SI 100)
  253.                                   (const_int 8))))])
  254.  
  255. `(match_par_dup N [SUBPAT...])'
  256.      Like `match_op_dup', but for `match_parallel' instead of
  257.      `match_operator'.
  258.  
  259. `(address (match_operand:M N "address_operand" ""))'
  260.      This complex of expressions is a placeholder for an operand number
  261.      N in a "load address" instruction: an operand which specifies a
  262.      memory location in the usual way, but for which the actual operand
  263.      value used is the address of the location, not the contents of the
  264.      location.
  265.  
  266.      `address' expressions never appear in RTL code, only in machine
  267.      descriptions.  And they are used only in machine descriptions that
  268.      do not use the operand constraint feature.  When operand
  269.      constraints are in use, the letter `p' in the constraint serves
  270.      this purpose.
  271.  
  272.      M is the machine mode of the *memory location being addressed*,
  273.      not the machine mode of the address itself.  That mode is always
  274.      the same on a given target machine (it is `Pmode', which normally
  275.      is `SImode'), so there is no point in mentioning it; thus, no
  276.      machine mode is written in the `address' expression.  If some day
  277.      support is added for machines in which addresses of different
  278.      kinds of objects appear differently or are used differently (such
  279.      as the PDP-10), different formats would perhaps need different
  280.      machine modes and these modes might be written in the `address'
  281.      expression.
  282.  
  283. 
  284. File: gcc.info,  Node: Output Template,  Next: Output Statement,  Prev: RTL Template,  Up: Machine Desc
  285.  
  286. Output Templates and Operand Substitution
  287. =========================================
  288.  
  289.    The "output template" is a string which specifies how to output the
  290. assembler code for an instruction pattern.  Most of the template is a
  291. fixed string which is output literally.  The character `%' is used to
  292. specify where to substitute an operand; it can also be used to identify
  293. places where different variants of the assembler require different
  294. syntax.
  295.  
  296.    In the simplest case, a `%' followed by a digit N says to output
  297. operand N at that point in the string.
  298.  
  299.    `%' followed by a letter and a digit says to output an operand in an
  300. alternate fashion.  Four letters have standard, built-in meanings
  301. described below.  The machine description macro `PRINT_OPERAND' can
  302. define additional letters with nonstandard meanings.
  303.  
  304.    `%cDIGIT' can be used to substitute an operand that is a constant
  305. value without the syntax that normally indicates an immediate operand.
  306.  
  307.    `%nDIGIT' is like `%cDIGIT' except that the value of the constant is
  308. negated before printing.
  309.  
  310.    `%aDIGIT' can be used to substitute an operand as if it were a
  311. memory reference, with the actual operand treated as the address.  This
  312. may be useful when outputting a "load address" instruction, because
  313. often the assembler syntax for such an instruction requires you to
  314. write the operand as if it were a memory reference.
  315.  
  316.    `%lDIGIT' is used to substitute a `label_ref' into a jump
  317. instruction.
  318.  
  319.    `%=' outputs a number which is unique to each instruction in the
  320. entire compilation.  This is useful for making local labels to be
  321. referred to more than once in a single template that generates multiple
  322. assembler instructions.
  323.  
  324.    `%' followed by a punctuation character specifies a substitution that
  325. does not use an operand.  Only one case is standard: `%%' outputs a `%'
  326. into the assembler code.  Other nonstandard cases can be defined in the
  327. `PRINT_OPERAND' macro.  You must also define which punctuation
  328. characters are valid with the `PRINT_OPERAND_PUNCT_VALID_P' macro.
  329.  
  330.    The template may generate multiple assembler instructions.  Write
  331. the text for the instructions, with `\;' between them.
  332.  
  333.    When the RTL contains two operands which are required by constraint
  334. to match each other, the output template must refer only to the
  335. lower-numbered operand.  Matching operands are not always identical,
  336. and the rest of the compiler arranges to put the proper RTL expression
  337. for printing into the lower-numbered operand.
  338.  
  339.    One use of nonstandard letters or punctuation following `%' is to
  340. distinguish between different assembler languages for the same machine;
  341. for example, Motorola syntax versus MIT syntax for the 68000.  Motorola
  342. syntax requires periods in most opcode names, while MIT syntax does
  343. not.  For example, the opcode `movel' in MIT syntax is `move.l' in
  344. Motorola syntax.  The same file of patterns is used for both kinds of
  345. output syntax, but the character sequence `%.' is used in each place
  346. where Motorola syntax wants a period.  The `PRINT_OPERAND' macro for
  347. Motorola syntax defines the sequence to output a period; the macro for
  348. MIT syntax defines it to do nothing.
  349.  
  350.    As a special case, a template consisting of the single character `#'
  351. instructs the compiler to first split the insn, and then output the
  352. resulting instructions separately.  This helps eliminate redundancy in
  353. the output templates.   If you have a `define_insn' that needs to emit
  354. multiple assembler instructions, and there is an matching `define_split'
  355. already defined, then you can simply use `#' as the output template
  356. instead of writing an output template that emits the multiple assembler
  357. instructions.
  358.  
  359. 
  360. File: gcc.info,  Node: Output Statement,  Next: Constraints,  Prev: Output Template,  Up: Machine Desc
  361.  
  362. C Statements for Generating Assembler Output
  363. ============================================
  364.  
  365.    Often a single fixed template string cannot produce correct and
  366. efficient assembler code for all the cases that are recognized by a
  367. single instruction pattern.  For example, the opcodes may depend on the
  368. kinds of operands; or some unfortunate combinations of operands may
  369. require extra machine instructions.
  370.  
  371.    If the output control string starts with a `@', then it is actually
  372. a series of templates, each on a separate line.  (Blank lines and
  373. leading spaces and tabs are ignored.)  The templates correspond to the
  374. pattern's constraint alternatives (*note Multi-Alternative::.).  For
  375. example, if a target machine has a two-address add instruction `addr'
  376. to add into a register and another `addm' to add a register to memory,
  377. you might write this pattern:
  378.  
  379.      (define_insn "addsi3"
  380.        [(set (match_operand:SI 0 "general_operand" "=r,m")
  381.              (plus:SI (match_operand:SI 1 "general_operand" "0,0")
  382.                       (match_operand:SI 2 "general_operand" "g,r")))]
  383.        ""
  384.        "@
  385.         addr %2,%0
  386.         addm %2,%0")
  387.  
  388.    If the output control string starts with a `*', then it is not an
  389. output template but rather a piece of C program that should compute a
  390. template.  It should execute a `return' statement to return the
  391. template-string you want.  Most such templates use C string literals,
  392. which require doublequote characters to delimit them.  To include these
  393. doublequote characters in the string, prefix each one with `\'.
  394.  
  395.    The operands may be found in the array `operands', whose C data type
  396. is `rtx []'.
  397.  
  398.    It is very common to select different ways of generating assembler
  399. code based on whether an immediate operand is within a certain range.
  400. Be careful when doing this, because the result of `INTVAL' is an
  401. integer on the host machine.  If the host machine has more bits in an
  402. `int' than the target machine has in the mode in which the constant
  403. will be used, then some of the bits you get from `INTVAL' will be
  404. superfluous.  For proper results, you must carefully disregard the
  405. values of those bits.
  406.  
  407.    It is possible to output an assembler instruction and then go on to
  408. output or compute more of them, using the subroutine `output_asm_insn'.
  409. This receives two arguments: a template-string and a vector of
  410. operands.  The vector may be `operands', or it may be another array of
  411. `rtx' that you declare locally and initialize yourself.
  412.  
  413.    When an insn pattern has multiple alternatives in its constraints,
  414. often the appearance of the assembler code is determined mostly by
  415. which alternative was matched.  When this is so, the C code can test
  416. the variable `which_alternative', which is the ordinal number of the
  417. alternative that was actually satisfied (0 for the first, 1 for the
  418. second alternative, etc.).
  419.  
  420.    For example, suppose there are two opcodes for storing zero, `clrreg'
  421. for registers and `clrmem' for memory locations.  Here is how a pattern
  422. could use `which_alternative' to choose between them:
  423.  
  424.      (define_insn ""
  425.        [(set (match_operand:SI 0 "general_operand" "=r,m")
  426.              (const_int 0))]
  427.        ""
  428.        "*
  429.        return (which_alternative == 0
  430.                ? \"clrreg %0\" : \"clrmem %0\");
  431.        ")
  432.  
  433.    The example above, where the assembler code to generate was *solely*
  434. determined by the alternative, could also have been specified as
  435. follows, having the output control string start with a `@':
  436.  
  437.      (define_insn ""
  438.        [(set (match_operand:SI 0 "general_operand" "=r,m")
  439.              (const_int 0))]
  440.        ""
  441.        "@
  442.         clrreg %0
  443.         clrmem %0")
  444.  
  445. 
  446. File: gcc.info,  Node: Constraints,  Next: Standard Names,  Prev: Output Statement,  Up: Machine Desc
  447.  
  448. Operand Constraints
  449. ===================
  450.  
  451.    Each `match_operand' in an instruction pattern can specify a
  452. constraint for the type of operands allowed.  Constraints can say
  453. whether an operand may be in a register, and which kinds of register;
  454. whether the operand can be a memory reference, and which kinds of
  455. address; whether the operand may be an immediate constant, and which
  456. possible values it may have.  Constraints can also require two operands
  457. to match.
  458.  
  459. * Menu:
  460.  
  461. * Simple Constraints::  Basic use of constraints.
  462. * Multi-Alternative::   When an insn has two alternative constraint-patterns.
  463. * Class Preferences::   Constraints guide which hard register to put things in.
  464. * Modifiers::           More precise control over effects of constraints.
  465. * Machine Constraints:: Existing constraints for some particular machines.
  466. * No Constraints::      Describing a clean machine without constraints.
  467.  
  468. 
  469. File: gcc.info,  Node: Simple Constraints,  Next: Multi-Alternative,  Up: Constraints
  470.  
  471. Simple Constraints
  472. ------------------
  473.  
  474.    The simplest kind of constraint is a string full of letters, each of
  475. which describes one kind of operand that is permitted.  Here are the
  476. letters that are allowed:
  477.  
  478. `m'
  479.      A memory operand is allowed, with any kind of address that the
  480.      machine supports in general.
  481.  
  482. `o'
  483.      A memory operand is allowed, but only if the address is
  484.      "offsettable".  This means that adding a small integer (actually,
  485.      the width in bytes of the operand, as determined by its machine
  486.      mode) may be added to the address and the result is also a valid
  487.      memory address.
  488.  
  489.      For example, an address which is constant is offsettable; so is an
  490.      address that is the sum of a register and a constant (as long as a
  491.      slightly larger constant is also within the range of
  492.      address-offsets supported by the machine); but an autoincrement or
  493.      autodecrement address is not offsettable.  More complicated
  494.      indirect/indexed addresses may or may not be offsettable depending
  495.      on the other addressing modes that the machine supports.
  496.  
  497.      Note that in an output operand which can be matched by another
  498.      operand, the constraint letter `o' is valid only when accompanied
  499.      by both `<' (if the target machine has predecrement addressing)
  500.      and `>' (if the target machine has preincrement addressing).
  501.  
  502. `V'
  503.      A memory operand that is not offsettable.  In other words,
  504.      anything that would fit the `m' constraint but not the `o'
  505.      constraint.
  506.  
  507. `<'
  508.      A memory operand with autodecrement addressing (either
  509.      predecrement or postdecrement) is allowed.
  510.  
  511. `>'
  512.      A memory operand with autoincrement addressing (either
  513.      preincrement or postincrement) is allowed.
  514.  
  515. `r'
  516.      A register operand is allowed provided that it is in a general
  517.      register.
  518.  
  519. `d', `a', `f', ...
  520.      Other letters can be defined in machine-dependent fashion to stand
  521.      for particular classes of registers.  `d', `a' and `f' are defined
  522.      on the 68000/68020 to stand for data, address and floating point
  523.      registers.
  524.  
  525. `i'
  526.      An immediate integer operand (one with constant value) is allowed.
  527.      This includes symbolic constants whose values will be known only at
  528.      assembly time.
  529.  
  530. `n'
  531.      An immediate integer operand with a known numeric value is allowed.
  532.      Many systems cannot support assembly-time constants for operands
  533.      less than a word wide.  Constraints for these operands should use
  534.      `n' rather than `i'.
  535.  
  536. `I', `J', `K', ... `P'
  537.      Other letters in the range `I' through `P' may be defined in a
  538.      machine-dependent fashion to permit immediate integer operands with
  539.      explicit integer values in specified ranges.  For example, on the
  540.      68000, `I' is defined to stand for the range of values 1 to 8.
  541.      This is the range permitted as a shift count in the shift
  542.      instructions.
  543.  
  544. `E'
  545.      An immediate floating operand (expression code `const_double') is
  546.      allowed, but only if the target floating point format is the same
  547.      as that of the host machine (on which the compiler is running).
  548.  
  549. `F'
  550.      An immediate floating operand (expression code `const_double') is
  551.      allowed.
  552.  
  553. `G', `H'
  554.      `G' and `H' may be defined in a machine-dependent fashion to
  555.      permit immediate floating operands in particular ranges of values.
  556.  
  557. `s'
  558.      An immediate integer operand whose value is not an explicit
  559.      integer is allowed.
  560.  
  561.      This might appear strange; if an insn allows a constant operand
  562.      with a value not known at compile time, it certainly must allow
  563.      any known value.  So why use `s' instead of `i'?  Sometimes it
  564.      allows better code to be generated.
  565.  
  566.      For example, on the 68000 in a fullword instruction it is possible
  567.      to use an immediate operand; but if the immediate value is between
  568.      -128 and 127, better code results from loading the value into a
  569.      register and using the register.  This is because the load into
  570.      the register can be done with a `moveq' instruction.  We arrange
  571.      for this to happen by defining the letter `K' to mean "any integer
  572.      outside the range -128 to 127", and then specifying `Ks' in the
  573.      operand constraints.
  574.  
  575. `g'
  576.      Any register, memory or immediate integer operand is allowed,
  577.      except for registers that are not general registers.
  578.  
  579. `X'
  580.      Any operand whatsoever is allowed, even if it does not satisfy
  581.      `general_operand'.  This is normally used in the constraint of a
  582.      `match_scratch' when certain alternatives will not actually
  583.      require a scratch register.
  584.  
  585. `0', `1', `2', ... `9'
  586.      An operand that matches the specified operand number is allowed.
  587.      If a digit is used together with letters within the same
  588.      alternative, the digit should come last.
  589.  
  590.      This is called a "matching constraint" and what it really means is
  591.      that the assembler has only a single operand that fills two roles
  592.      considered separate in the RTL insn.  For example, an add insn has
  593.      two input operands and one output operand in the RTL, but on most
  594.      CISC machines an add instruction really has only two operands, one
  595.      of them an input-output operand:
  596.  
  597.           addl #35,r12
  598.  
  599.      Matching constraints are used in these circumstances.  More
  600.      precisely, the two operands that match must include one input-only
  601.      operand and one output-only operand.  Moreover, the digit must be a
  602.      smaller number than the number of the operand that uses it in the
  603.      constraint.
  604.  
  605.      For operands to match in a particular case usually means that they
  606.      are identical-looking RTL expressions.  But in a few special cases
  607.      specific kinds of dissimilarity are allowed.  For example, `*x' as
  608.      an input operand will match `*x++' as an output operand.  For
  609.      proper results in such cases, the output template should always
  610.      use the output-operand's number when printing the operand.
  611.  
  612. `p'
  613.      An operand that is a valid memory address is allowed.  This is for
  614.      "load address" and "push address" instructions.
  615.  
  616.      `p' in the constraint must be accompanied by `address_operand' as
  617.      the predicate in the `match_operand'.  This predicate interprets
  618.      the mode specified in the `match_operand' as the mode of the memory
  619.      reference for which the address would be valid.
  620.  
  621. `Q', `R', `S', ... `U'
  622.      Letters in the range `Q' through `U' may be defined in a
  623.      machine-dependent fashion to stand for arbitrary operand types.
  624.      The machine description macro `EXTRA_CONSTRAINT' is passed the
  625.      operand as its first argument and the constraint letter as its
  626.      second operand.
  627.  
  628.      A typical use for this would be to distinguish certain types of
  629.      memory references that affect other insn operands.
  630.  
  631.      Do not define these constraint letters to accept register
  632.      references (`reg'); the reload pass does not expect this and would
  633.      not handle it properly.
  634.  
  635.    In order to have valid assembler code, each operand must satisfy its
  636. constraint.  But a failure to do so does not prevent the pattern from
  637. applying to an insn.  Instead, it directs the compiler to modify the
  638. code so that the constraint will be satisfied.  Usually this is done by
  639. copying an operand into a register.
  640.  
  641.    Contrast, therefore, the two instruction patterns that follow:
  642.  
  643.      (define_insn ""
  644.        [(set (match_operand:SI 0 "general_operand" "=r")
  645.              (plus:SI (match_dup 0)
  646.                       (match_operand:SI 1 "general_operand" "r")))]
  647.        ""
  648.        "...")
  649.  
  650. which has two operands, one of which must appear in two places, and
  651.  
  652.      (define_insn ""
  653.        [(set (match_operand:SI 0 "general_operand" "=r")
  654.              (plus:SI (match_operand:SI 1 "general_operand" "0")
  655.                       (match_operand:SI 2 "general_operand" "r")))]
  656.        ""
  657.        "...")
  658.  
  659. which has three operands, two of which are required by a constraint to
  660. be identical.  If we are considering an insn of the form
  661.  
  662.      (insn N PREV NEXT
  663.        (set (reg:SI 3)
  664.             (plus:SI (reg:SI 6) (reg:SI 109)))
  665.        ...)
  666.  
  667. the first pattern would not apply at all, because this insn does not
  668. contain two identical subexpressions in the right place.  The pattern
  669. would say, "That does not look like an add instruction; try other
  670. patterns." The second pattern would say, "Yes, that's an add
  671. instruction, but there is something wrong with it."  It would direct
  672. the reload pass of the compiler to generate additional insns to make
  673. the constraint true.  The results might look like this:
  674.  
  675.      (insn N2 PREV N
  676.        (set (reg:SI 3) (reg:SI 6))
  677.        ...)
  678.      
  679.      (insn N N2 NEXT
  680.        (set (reg:SI 3)
  681.             (plus:SI (reg:SI 3) (reg:SI 109)))
  682.        ...)
  683.  
  684.    It is up to you to make sure that each operand, in each pattern, has
  685. constraints that can handle any RTL expression that could be present for
  686. that operand.  (When multiple alternatives are in use, each pattern
  687. must, for each possible combination of operand expressions, have at
  688. least one alternative which can handle that combination of operands.)
  689. The constraints don't need to *allow* any possible operand--when this is
  690. the case, they do not constrain--but they must at least point the way to
  691. reloading any possible operand so that it will fit.
  692.  
  693.    * If the constraint accepts whatever operands the predicate permits,
  694.      there is no problem: reloading is never necessary for this operand.
  695.  
  696.      For example, an operand whose constraints permit everything except
  697.      registers is safe provided its predicate rejects registers.
  698.  
  699.      An operand whose predicate accepts only constant values is safe
  700.      provided its constraints include the letter `i'.  If any possible
  701.      constant value is accepted, then nothing less than `i' will do; if
  702.      the predicate is more selective, then the constraints may also be
  703.      more selective.
  704.  
  705.    * Any operand expression can be reloaded by copying it into a
  706.      register.  So if an operand's constraints allow some kind of
  707.      register, it is certain to be safe.  It need not permit all
  708.      classes of registers; the compiler knows how to copy a register
  709.      into another register of the proper class in order to make an
  710.      instruction valid.
  711.  
  712.    * A nonoffsettable memory reference can be reloaded by copying the
  713.      address into a register.  So if the constraint uses the letter
  714.      `o', all memory references are taken care of.
  715.  
  716.    * A constant operand can be reloaded by allocating space in memory to
  717.      hold it as preinitialized data.  Then the memory reference can be
  718.      used in place of the constant.  So if the constraint uses the
  719.      letters `o' or `m', constant operands are not a problem.
  720.  
  721.    * If the constraint permits a constant and a pseudo register used in
  722.      an insn was not allocated to a hard register and is equivalent to
  723.      a constant, the register will be replaced with the constant.  If
  724.      the predicate does not permit a constant and the insn is
  725.      re-recognized for some reason, the compiler will crash.  Thus the
  726.      predicate must always recognize any objects allowed by the
  727.      constraint.
  728.  
  729.    If the operand's predicate can recognize registers, but the
  730. constraint does not permit them, it can make the compiler crash.  When
  731. this operand happens to be a register, the reload pass will be stymied,
  732. because it does not know how to copy a register temporarily into memory.
  733.  
  734. 
  735. File: gcc.info,  Node: Multi-Alternative,  Next: Class Preferences,  Prev: Simple Constraints,  Up: Constraints
  736.  
  737. Multiple Alternative Constraints
  738. --------------------------------
  739.  
  740.    Sometimes a single instruction has multiple alternative sets of
  741. possible operands.  For example, on the 68000, a logical-or instruction
  742. can combine register or an immediate value into memory, or it can
  743. combine any kind of operand into a register; but it cannot combine one
  744. memory location into another.
  745.  
  746.    These constraints are represented as multiple alternatives.  An
  747. alternative can be described by a series of letters for each operand.
  748. The overall constraint for an operand is made from the letters for this
  749. operand from the first alternative, a comma, the letters for this
  750. operand from the second alternative, a comma, and so on until the last
  751. alternative.  Here is how it is done for fullword logical-or on the
  752. 68000:
  753.  
  754.      (define_insn "iorsi3"
  755.        [(set (match_operand:SI 0 "general_operand" "=m,d")
  756.              (ior:SI (match_operand:SI 1 "general_operand" "%0,0")
  757.                      (match_operand:SI 2 "general_operand" "dKs,dmKs")))]
  758.        ...)
  759.  
  760.    The first alternative has `m' (memory) for operand 0, `0' for
  761. operand 1 (meaning it must match operand 0), and `dKs' for operand 2.
  762. The second alternative has `d' (data register) for operand 0, `0' for
  763. operand 1, and `dmKs' for operand 2.  The `=' and `%' in the
  764. constraints apply to all the alternatives; their meaning is explained
  765. in the next section (*note Class Preferences::.).
  766.  
  767.    If all the operands fit any one alternative, the instruction is
  768. valid.  Otherwise, for each alternative, the compiler counts how many
  769. instructions must be added to copy the operands so that that
  770. alternative applies.  The alternative requiring the least copying is
  771. chosen.  If two alternatives need the same amount of copying, the one
  772. that comes first is chosen.  These choices can be altered with the `?'
  773. and `!' characters:
  774.  
  775. `?'
  776.      Disparage slightly the alternative that the `?' appears in, as a
  777.      choice when no alternative applies exactly.  The compiler regards
  778.      this alternative as one unit more costly for each `?' that appears
  779.      in it.
  780.  
  781. `!'
  782.      Disparage severely the alternative that the `!' appears in.  This
  783.      alternative can still be used if it fits without reloading, but if
  784.      reloading is needed, some other alternative will be used.
  785.  
  786.    When an insn pattern has multiple alternatives in its constraints,
  787. often the appearance of the assembler code is determined mostly by which
  788. alternative was matched.  When this is so, the C code for writing the
  789. assembler code can use the variable `which_alternative', which is the
  790. ordinal number of the alternative that was actually satisfied (0 for
  791. the first, 1 for the second alternative, etc.).  *Note Output
  792. Statement::.
  793.  
  794. 
  795. File: gcc.info,  Node: Class Preferences,  Next: Modifiers,  Prev: Multi-Alternative,  Up: Constraints
  796.  
  797. Register Class Preferences
  798. --------------------------
  799.  
  800.    The operand constraints have another function: they enable the
  801. compiler to decide which kind of hardware register a pseudo register is
  802. best allocated to.  The compiler examines the constraints that apply to
  803. the insns that use the pseudo register, looking for the
  804. machine-dependent letters such as `d' and `a' that specify classes of
  805. registers.  The pseudo register is put in whichever class gets the most
  806. "votes".  The constraint letters `g' and `r' also vote: they vote in
  807. favor of a general register.  The machine description says which
  808. registers are considered general.
  809.  
  810.    Of course, on some machines all registers are equivalent, and no
  811. register classes are defined.  Then none of this complexity is relevant.
  812.  
  813. 
  814. File: gcc.info,  Node: Modifiers,  Next: Machine Constraints,  Prev: Class Preferences,  Up: Constraints
  815.  
  816. Constraint Modifier Characters
  817. ------------------------------
  818.  
  819. `='
  820.      Means that this operand is write-only for this instruction: the
  821.      previous value is discarded and replaced by output data.
  822.  
  823. `+'
  824.      Means that this operand is both read and written by the
  825.      instruction.
  826.  
  827.      When the compiler fixes up the operands to satisfy the constraints,
  828.      it needs to know which operands are inputs to the instruction and
  829.      which are outputs from it.  `=' identifies an output; `+'
  830.      identifies an operand that is both input and output; all other
  831.      operands are assumed to be input only.
  832.  
  833. `&'
  834.      Means (in a particular alternative) that this operand is written
  835.      before the instruction is finished using the input operands.
  836.      Therefore, this operand may not lie in a register that is used as
  837.      an input operand or as part of any memory address.
  838.  
  839.      `&' applies only to the alternative in which it is written.  In
  840.      constraints with multiple alternatives, sometimes one alternative
  841.      requires `&' while others do not.  See, for example, the `movdf'
  842.      insn of the 68000.
  843.  
  844.      `&' does not obviate the need to write `='.
  845.  
  846. `%'
  847.      Declares the instruction to be commutative for this operand and the
  848.      following operand.  This means that the compiler may interchange
  849.      the two operands if that is the cheapest way to make all operands
  850.      fit the constraints.  This is often used in patterns for addition
  851.      instructions that really have only two operands: the result must
  852.      go in one of the arguments.  Here for example, is how the 68000
  853.      halfword-add instruction is defined:
  854.  
  855.           (define_insn "addhi3"
  856.             [(set (match_operand:HI 0 "general_operand" "=m,r")
  857.                (plus:HI (match_operand:HI 1 "general_operand" "%0,0")
  858.                         (match_operand:HI 2 "general_operand" "di,g")))]
  859.             ...)
  860.  
  861. `#'
  862.      Says that all following characters, up to the next comma, are to be
  863.      ignored as a constraint.  They are significant only for choosing
  864.      register preferences.
  865.  
  866. `*'
  867.      Says that the following character should be ignored when choosing
  868.      register preferences.  `*' has no effect on the meaning of the
  869.      constraint as a constraint, and no effect on reloading.
  870.  
  871.      Here is an example: the 68000 has an instruction to sign-extend a
  872.      halfword in a data register, and can also sign-extend a value by
  873.      copying it into an address register.  While either kind of
  874.      register is acceptable, the constraints on an address-register
  875.      destination are less strict, so it is best if register allocation
  876.      makes an address register its goal.  Therefore, `*' is used so
  877.      that the `d' constraint letter (for data register) is ignored when
  878.      computing register preferences.
  879.  
  880.           (define_insn "extendhisi2"
  881.             [(set (match_operand:SI 0 "general_operand" "=*d,a")
  882.                   (sign_extend:SI
  883.                    (match_operand:HI 1 "general_operand" "0,g")))]
  884.             ...)
  885.  
  886. 
  887. File: gcc.info,  Node: Machine Constraints,  Next: No Constraints,  Prev: Modifiers,  Up: Constraints
  888.  
  889. Constraints for Particular Machines
  890. -----------------------------------
  891.  
  892.    Whenever possible, you should use the general-purpose constraint
  893. letters in `asm' arguments, since they will convey meaning more readily
  894. to people reading your code.  Failing that, use the constraint letters
  895. that usually have very similar meanings across architectures.  The most
  896. commonly used constraints are `m' and `r' (for memory and
  897. general-purpose registers respectively; *note Simple Constraints::.),
  898. and `I', usually the letter indicating the most common
  899. immediate-constant format.
  900.  
  901.    For each machine architecture, the `config/MACHINE.h' file defines
  902. additional constraints.  These constraints are used by the compiler
  903. itself for instruction generation, as well as for `asm' statements;
  904. therefore, some of the constraints are not particularly interesting for
  905. `asm'.  The constraints are defined through these macros:
  906.  
  907. `REG_CLASS_FROM_LETTER'
  908.      Register class constraints (usually lower case).
  909.  
  910. `CONST_OK_FOR_LETTER_P'
  911.      Immediate constant constraints, for non-floating point constants of
  912.      word size or smaller precision (usually upper case).
  913.  
  914. `CONST_DOUBLE_OK_FOR_LETTER_P'
  915.      Immediate constant constraints, for all floating point constants
  916.      and for constants of greater than word size precision (usually
  917.      upper case).
  918.  
  919. `EXTRA_CONSTRAINT'
  920.      Special cases of registers or memory.  This macro is not required,
  921.      and is only defined for some machines.
  922.  
  923.    Inspecting these macro definitions in the compiler source for your
  924. machine is the best way to be certain you have the right constraints.
  925. However, here is a summary of the machine-dependent constraints
  926. available on some particular machines.
  927.  
  928. *AMD 29000 family--`a29k.h'*
  929.     `l'
  930.           Local register 0
  931.  
  932.     `b'
  933.           Byte Pointer (`BP') register
  934.  
  935.     `q'
  936.           `Q' register
  937.  
  938.     `h'
  939.           Special purpose register
  940.  
  941.     `A'
  942.           First accumulator register
  943.  
  944.     `a'
  945.           Other accumulator register
  946.  
  947.     `f'
  948.           Floating point register
  949.  
  950.     `I'
  951.           Constant greater than 0, less than 0x100
  952.  
  953.     `J'
  954.           Constant greater than 0, less than 0x10000
  955.  
  956.     `K'
  957.           Constant whose high 24 bits are on (1)
  958.  
  959.     `L'
  960.           16 bit constant whose high 8 bits are on (1)
  961.  
  962.     `M'
  963.           32 bit constant whose high 16 bits are on (1)
  964.  
  965.     `N'
  966.           32 bit negative constant that fits in 8 bits
  967.  
  968.     `O'
  969.           The constant 0x80000000 or, on the 29050, any 32 bit constant
  970.           whose low 16 bits are 0.
  971.  
  972.     `P'
  973.           16 bit negative constant that fits in 8 bits
  974.  
  975.     `G'
  976.     `H'
  977.           A floating point constant (in `asm' statements, use the
  978.           machine independent `E' or `F' instead)
  979.  
  980. *IBM RS6000--`rs6000.h'*
  981.     `b'
  982.           Address base register
  983.  
  984.     `f'
  985.           Floating point register
  986.  
  987.     `h'
  988.           `MQ', `CTR', or `LINK' register
  989.  
  990.     `q'
  991.           `MQ' register
  992.  
  993.     `c'
  994.           `CTR' register
  995.  
  996.     `l'
  997.           `LINK' register
  998.  
  999.     `x'
  1000.           `CR' register (condition register) number 0
  1001.  
  1002.     `y'
  1003.           `CR' register (condition register)
  1004.  
  1005.     `I'
  1006.           Signed 16 bit constant
  1007.  
  1008.     `J'
  1009.           Constant whose low 16 bits are 0
  1010.  
  1011.     `K'
  1012.           Constant whose high 16 bits are 0
  1013.  
  1014.     `L'
  1015.           Constant suitable as a mask operand
  1016.  
  1017.     `M'
  1018.           Constant larger than 31
  1019.  
  1020.     `N'
  1021.           Exact power of 2
  1022.  
  1023.     `O'
  1024.           Zero
  1025.  
  1026.     `P'
  1027.           Constant whose negation is a signed 16 bit constant
  1028.  
  1029.     `G'
  1030.           Floating point constant that can be loaded into a register
  1031.           with one instruction per word
  1032.  
  1033.     `Q'
  1034.           Memory operand that is an offset from a register (`m' is
  1035.           preferable for `asm' statements)
  1036.  
  1037. *Intel 386--`i386.h'*
  1038.     `q'
  1039.           `a', `b', `c', or `d' register
  1040.  
  1041.     `f'
  1042.           Floating point register
  1043.  
  1044.     `t'
  1045.           First (top of stack) floating point register
  1046.  
  1047.     `u'
  1048.           Second floating point register
  1049.  
  1050.     `a'
  1051.           `a' register
  1052.  
  1053.     `b'
  1054.           `b' register
  1055.  
  1056.     `c'
  1057.           `c' register
  1058.  
  1059.     `d'
  1060.           `d' register
  1061.  
  1062.     `D'
  1063.           `di' register
  1064.  
  1065.     `S'
  1066.           `si' register
  1067.  
  1068.     `I'
  1069.           Constant in range 0 to 31 (for 32 bit shifts)
  1070.  
  1071.     `J'
  1072.           Constant in range 0 to 63 (for 64 bit shifts)
  1073.  
  1074.     `K'
  1075.           `0xff'
  1076.  
  1077.     `L'
  1078.           `0xffff'
  1079.  
  1080.     `M'
  1081.           0, 1, 2, or 3 (shifts for `lea' instruction)
  1082.  
  1083.     `G'
  1084.           Standard 80387 floating point constant
  1085.  
  1086. *Intel 960--`i960.h'*
  1087.     `f'
  1088.           Floating point register (`fp0' to `fp3')
  1089.  
  1090.     `l'
  1091.           Local register (`r0' to `r15')
  1092.  
  1093.     `b'
  1094.           Global register (`g0' to `g15')
  1095.  
  1096.     `d'
  1097.           Any local or global register
  1098.  
  1099.     `I'
  1100.           Integers from 0 to 31
  1101.  
  1102.     `J'
  1103.           0
  1104.  
  1105.     `K'
  1106.           Integers from -31 to 0
  1107.  
  1108.     `G'
  1109.           Floating point 0
  1110.  
  1111.     `H'
  1112.           Floating point 1
  1113.  
  1114. *MIPS--`mips.h'*
  1115.     `d'
  1116.           General-purpose integer register
  1117.  
  1118.     `f'
  1119.           Floating-point register (if available)
  1120.  
  1121.     `h'
  1122.           `Hi' register
  1123.  
  1124.     `l'
  1125.           `Lo' register
  1126.  
  1127.     `x'
  1128.           `Hi' or `Lo' register
  1129.  
  1130.     `y'
  1131.           General-purpose integer register
  1132.  
  1133.     `z'
  1134.           Floating-point status register
  1135.  
  1136.     `I'
  1137.           Signed 16 bit constant (for arithmetic instructions)
  1138.  
  1139.     `J'
  1140.           Zero
  1141.  
  1142.     `K'
  1143.           Zero-extended 16-bit constant (for logic instructions)
  1144.  
  1145.     `L'
  1146.           Constant with low 16 bits zero (can be loaded with `lui')
  1147.  
  1148.     `M'
  1149.           32 bit constant which requires two instructions to load (a
  1150.           constant which is not `I', `K', or `L')
  1151.  
  1152.     `N'
  1153.           Negative 16 bit constant
  1154.  
  1155.     `O'
  1156.           Exact power of two
  1157.  
  1158.     `P'
  1159.           Positive 16 bit constant
  1160.  
  1161.     `G'
  1162.           Floating point zero
  1163.  
  1164.     `Q'
  1165.           Memory reference that can be loaded with more than one
  1166.           instruction (`m' is preferable for `asm' statements)
  1167.  
  1168.     `R'
  1169.           Memory reference that can be loaded with one instruction (`m'
  1170.           is preferable for `asm' statements)
  1171.  
  1172.     `S'
  1173.           Memory reference in external OSF/rose PIC format (`m' is
  1174.           preferable for `asm' statements)
  1175.  
  1176. *Motorola 680x0--`m68k.h'*
  1177.     `a'
  1178.           Address register
  1179.  
  1180.     `d'
  1181.           Data register
  1182.  
  1183.     `f'
  1184.           68881 floating-point register, if available
  1185.  
  1186.     `x'
  1187.           Sun FPA (floating-point) register, if available
  1188.  
  1189.     `y'
  1190.           First 16 Sun FPA registers, if available
  1191.  
  1192.     `I'
  1193.           Integer in the range 1 to 8
  1194.  
  1195.     `J'
  1196.           16 bit signed number
  1197.  
  1198.     `K'
  1199.           Signed number whose magnitude is greater than 0x80
  1200.  
  1201.     `L'
  1202.           Integer in the range -8 to -1
  1203.  
  1204.     `G'
  1205.           Floating point constant that is not a 68881 constant
  1206.  
  1207.     `H'
  1208.           Floating point constant that can be used by Sun FPA
  1209.  
  1210. *SPARC--`sparc.h'*
  1211.     `f'
  1212.           Floating-point register
  1213.  
  1214.     `I'
  1215.           Signed 13 bit constant
  1216.  
  1217.     `J'
  1218.           Zero
  1219.  
  1220.     `K'
  1221.           32 bit constant with the low 12 bits clear (a constant that
  1222.           can be loaded with the `sethi' instruction)
  1223.  
  1224.     `G'
  1225.           Floating-point zero
  1226.  
  1227.     `H'
  1228.           Signed 13 bit constant, sign-extended to 32 or 64 bits
  1229.  
  1230.     `Q'
  1231.           Memory reference that can be loaded with one instruction
  1232.           (`m' is more appropriate for `asm' statements)
  1233.  
  1234.     `S'
  1235.           Constant, or memory address
  1236.  
  1237.     `T'
  1238.           Memory address aligned to an 8-byte boundary
  1239.  
  1240.     `U'
  1241.           Even register
  1242.  
  1243. 
  1244. File: gcc.info,  Node: No Constraints,  Prev: Machine Constraints,  Up: Constraints
  1245.  
  1246. Not Using Constraints
  1247. ---------------------
  1248.  
  1249.    Some machines are so clean that operand constraints are not
  1250. required.  For example, on the Vax, an operand valid in one context is
  1251. valid in any other context.  On such a machine, every operand
  1252. constraint would be `g', excepting only operands of "load address"
  1253. instructions which are written as if they referred to a memory
  1254. location's contents but actual refer to its address.  They would have
  1255. constraint `p'.
  1256.  
  1257.    For such machines, instead of writing `g' and `p' for all the
  1258. constraints, you can choose to write a description with empty
  1259. constraints.  Then you write `""' for the constraint in every
  1260. `match_operand'.  Address operands are identified by writing an
  1261. `address' expression around the `match_operand', not by their
  1262. constraints.
  1263.  
  1264.    When the machine description has just empty constraints, certain
  1265. parts of compilation are skipped, making the compiler faster.  However,
  1266. few machines actually do not need constraints; all machine descriptions
  1267. now in existence use constraints.
  1268.  
  1269.