@@ -24,34 +24,35 @@ namespace Fortran::tools {
2424    const  std::string &compilerVersion, const  std::string &compilerOptions) {
2525
2626  const  llvm::Triple &targetTriple{targetMachine.getTargetTriple ()};
27-   //  FIXME: Handle real(3) ?
28-   if  (targetTriple.getArch () != llvm::Triple::ArchType::x86_64) {
29-     targetCharacteristics.DisableType (
30-         Fortran::common::TypeCategory::Real, /* kind=*/ 10 );
31-   }
27+ 
28+   targetCharacteristics.set_ieeeFeature (evaluate::IeeeFeature::Halting, true );
29+ 
3230  if  (targetTriple.getArch () == llvm::Triple::ArchType::x86_64) {
3331    targetCharacteristics.set_hasSubnormalFlushingControl (/* kind=*/ 3 );
3432    targetCharacteristics.set_hasSubnormalFlushingControl (/* kind=*/ 4 );
3533    targetCharacteristics.set_hasSubnormalFlushingControl (/* kind=*/ 8 );
3634  }
35+ 
3736  if  (targetTriple.isARM () || targetTriple.isAArch64 ()) {
3837    targetCharacteristics.set_haltingSupportIsUnknownAtCompileTime ();
3938    targetCharacteristics.set_ieeeFeature (
4039        evaluate::IeeeFeature::Halting, false );
41-   } else  {
42-     targetCharacteristics.set_ieeeFeature (evaluate::IeeeFeature::Halting);
40+     targetCharacteristics.set_hasSubnormalFlushingControl (/* kind=*/ 3 );
41+     targetCharacteristics.set_hasSubnormalFlushingControl (/* kind=*/ 4 );
42+     targetCharacteristics.set_hasSubnormalFlushingControl (/* kind=*/ 8 );
43+   }
44+ 
45+   if  (targetTriple.getArch () != llvm::Triple::ArchType::x86_64) {
46+     targetCharacteristics.DisableType (
47+         Fortran::common::TypeCategory::Real, /* kind=*/ 10 );
4348  }
4449
45-   //  Figure out if we can support F128: see
46-   //  flang/runtime/Float128Math/math-entries.h
47-   //  TODO: this should be taken from TargetInfo::getLongDoubleFormat to support
48-   //  cross-compilation
50+   //  Check for kind=16 support. See flang/runtime/Float128Math/math-entries.h.
51+   //  TODO: Take this from TargetInfo::getLongDoubleFormat for cross compilation.
4952#ifdef  FLANG_RUNTIME_F128_MATH_LIB
50-   //  we can use libquadmath wrappers
51-   constexpr  bool  f128Support = true ;
53+   constexpr  bool  f128Support = true ; //  use libquadmath wrappers
5254#elif  HAS_LDBL128
53-   //  we can use libm wrappers
54-   constexpr  bool  f128Support = true ;
55+   constexpr  bool  f128Support = true ; //  use libm wrappers
5556#else 
5657  constexpr  bool  f128Support = false ;
5758#endif 
0 commit comments