https://gcc.gnu.org/g:c645ba0c7ba882871a7541e1a7edff78b42df004
commit c645ba0c7ba882871a7541e1a7edff78b42df004 Author: Michael Meissner <[email protected]> Date: Mon Nov 10 13:32:26 2025 -0500 Tell user if we have hardware support for 16-bit floating point. 2025-11-10 Michael Meissner <[email protected]> gcc/ * config/rs6000/rs6000-c.cc (rs6000_target_modify_macros); Define __BFLOAT16_HW__ if we have hardware support for __bflot16 conversions. Define __FLOAT16_HW__ if we have hardware support for _Float16 conversions. Diff: --- gcc/config/rs6000/rs6000-c.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/config/rs6000/rs6000-c.cc b/gcc/config/rs6000/rs6000-c.cc index a9e611d3488a..4d17cc7bb9b0 100644 --- a/gcc/config/rs6000/rs6000-c.cc +++ b/gcc/config/rs6000/rs6000-c.cc @@ -594,6 +594,10 @@ rs6000_target_modify_macros (bool define_p, { rs6000_define_or_undefine_macro (define_p, "__FLOAT16__"); rs6000_define_or_undefine_macro (define_p, "__BFLOAT16__"); + if ((cpu_option & CPU_OPTION_POWER9_MASK) != 0) + rs6000_define_or_undefine_macro (define_p, "__FLOAT16_HW__"); + if ((cpu_option & CPU_OPTION_POWER10_MASK) != 0) + rs6000_define_or_undefine_macro (define_p, "__BFLOAT16_HW__"); } /* Tell the user if we are targeting CELL. */ if (rs6000_cpu == PROCESSOR_CELL)
