Call frame information directives for tracking resources and CFAs
Syntax
CFI cfa { resource | resource + constant | resource - constant }
CFI cfacfiexpr
CFI resource { UNDEFINED | SAMEVALUE | CONCAT }
CFI resource { resource | FRAME(cfa, offset) }
CFI resourcecfiexpr
Parameters
| The name of a CFA (canonical frame address). |
| A CFI expression, which can be one of these:
|
| A constant value or an assembler expression that can be evaluated to a constant value. |
| The offset relative the CFA. An integer with an optional sign. |
| The name of a resource. |
Unary operators
Overall syntax: OPERATOR(operand)
CFI operator | Operand | Description |
|---|---|---|
| Performs a bitwise | |
| Get the value of the assembler expression. This can insert the value of a regular assembler expression into a CFI expression. | |
| Negates a logical CFI expression. | |
| Performs arithmetic negation on a CFI expression. |
Binary operators
Overall syntax: OPERATOR(operand1,operand2)
CFI operator | Operands | Description |
|---|---|---|
| Addition | |
| Bitwise | |
| Division | |
| Equal to | |
| Greater than or equal to | |
| Greater than | |
| Less than or equal to | |
| Logical shift left of the left operand. The number of bits to shift is specified by the right operand. The sign bit will not be preserved when shifting. | |
| Less than | |
| Modulo | |
| Multiplication | |
| Not equal to | |
| Bitwise OR | |
| Arithmetic shift right of the left operand. The number of bits to shift is specified by the right operand. In contrast with | |
| Logical shift right of the left operand. The number of bits to shift is specified by the right operand. The sign bit will not be preserved when shifting. | |
| Subtraction | |
| Bitwise |
Ternary operators
Overall syntax: OPERATOR(operand1,operand2,operand3)
Operator | Operands | Description |
|---|---|---|
| Gets the value from a stack frame. The operands are:
Gets the value at address | |
| Conditional operator. The operands are:
If the conditional expression is non-zero, the result is the value of the | |
| Gets the value from memory. The operands are:
Gets the value at address |
Description
Use these directives to track resources and CFAs in common blocks and data blocks:
Directive | Description |
|---|---|
Declares the value of a CFA. | |
Declares the value of a resource. |
Example
Examples of using CFI directives