[PATCH] D139549: [X86][ConstraintFP] Model `MXCSR` for function call

Serge Pavlov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 22:08:09 PST 2023


sepavloff added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/TargetLowering.h:4474-4478
+  /// Returns a 0 terminated array of rounding control registers that can be
+  /// attached into strict FP call.
+  virtual const MCPhysReg *getRoundingControlRegisters() const {
+    return nullptr;
+  }
----------------
The function name is a bit misleading, maybe `getFPEnvironmentRegisters` or some thing like that?

If this function lists FP environment registers that can be changed by a call, then any FP control mode register, not only rounding control (for example, denormal treatment or precision control) also can be modified. FP status information, like raised exception, also may be changed in the called procedure, so it is reasonable to include relevant registers as well.

MXCSR contains all this information but other architectures may have different registers for such information.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139549



More information about the llvm-commits mailing list