index.sub
← index dialect
Address-domain subtraction. Operands and result must all be index or all offset. Offset subtraction wraps modulo the selected target's unsigned offset carrier.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Traits |
Pure, DistributionTransfer |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
lhs |
address |
required |
— |
| Operand |
rhs |
address |
required |
— |
| Result |
result |
address |
required |
— |
Verification constraints
SameType(lhs, rhs, result)
Examples
%r = index.sub %lhs, %rhs : index
%delta = index.sub %end, %base : offset