1 #ifndef FORTRAN_TEST_EVALUATE_FP_TESTING_H_
2 #define FORTRAN_TEST_EVALUATE_FP_TESTING_H_
4 #include "flang/Evaluate/target.h"
7 using Fortran::common::RoundingMode
;
8 using Fortran::evaluate::RealFlags
;
9 using Fortran::evaluate::Rounding
;
11 class ScopedHostFloatingPointEnvironment
{
13 ScopedHostFloatingPointEnvironment(bool treatSubnormalOperandsAsZero
= false,
14 bool flushSubnormalResultsToZero
= false);
15 ~ScopedHostFloatingPointEnvironment();
16 void ClearFlags() const;
17 static RealFlags
CurrentFlags();
18 static void SetRounding(Rounding rounding
);
23 unsigned int originalMxcsr
;
27 #endif // FORTRAN_TEST_EVALUATE_FP_TESTING_H_