[PATCH] D156989: FloatingPointMode: Use -1 for "Dynamic"

Serge Pavlov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 29 00:13:49 PDT 2023


sepavloff added a comment.

`Dynamic` cannot have value `-1`, its value must fits 3 bits. Some targets encode rounding mode in instructions, RISCV is an example. It allows five "real" rounding modes, enlisted now in `RoundingMode` to be specified in a special field or FP instruction. This field also can contain a distinct value that instructs the processor to take rounding mode from a special register. This is a "dynamic" rounding mode in contract to the "static" modes, specified by one of "real" values. When `#pragma STC FENV_ACCESS ON` is specified, FP operations must use the "dynamic" rounding mode, - they have `Dynamic` in FPOptions of their AST nodes.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156989/new/

https://reviews.llvm.org/D156989



More information about the cfe-commits mailing list