GCC: Difference between revisions
| Line 29: | Line 29: | ||
* outputs, inputs and clobbers are expressed in a colon-delimited list of comma-delimited lists of the form [''asmsymbol''] "''constraints''" (''c symbol'') | * outputs, inputs and clobbers are expressed in a colon-delimited list of comma-delimited lists of the form [''asmsymbol''] "''constraints''" (''c symbol'') | ||
** operand constraints are properties of the assembly code, not the values | ** operand constraints are properties of the assembly code, not the values | ||
** without "=" or "+" constraint modifier, operands are assumed to be read-only | |||
** compiler verifies that all outputs are lvalues. types of operands are '''not''' checked. | ** compiler verifies that all outputs are lvalues. types of operands are '''not''' checked. | ||
** | ** "cc" logical register ought be listed as a clobber if the conditional code register is changed | ||
** "memory" must be listed as clobbered if memory is touched in an unpredictable fashion | |||
* constraint modifiers: | |||
** "=": operand is write-only (previous value needn't be preserved until write) | |||
** "+": operand is read-write (can't be arbitrarily used) | |||
** "&": operand is clobbered early (prior to use of all inputs), and thus can't be placed atop an input operand's | |||
==Intermediate Representations== | ==Intermediate Representations== | ||