We need to create a document that defines the behavior of all fixed-point operations we implement, i.e., the precise ones. We should also specify the expected behavior that lowering to a back-end produces for the closed operations.
In general:
- Closed operations only use the data type of the operands, even for intermediaries, and therefore rely on microarchitectural details (e.g., overflow & carry).
- Closed operations can always be lowered to precise ones, but that may not be useful in all cases.
- Precise operations always return the smallest static supertype that can exactly encode the result value for the given operands. This must be unambiguous and deterministic.
Refer to FixedPointInterpreter for current assumptions.
We need to create a document that defines the behavior of all fixed-point operations we implement, i.e., the precise ones. We should also specify the expected behavior that lowering to a back-end produces for the closed operations.
In general:
Refer to
FixedPointInterpreterfor current assumptions.