https://gcc.gnu.org/g:969a98dbe220a8f2eddf3a027043d6a26a314ed1

commit 969a98dbe220a8f2eddf3a027043d6a26a314ed1
Author: Michael Meissner <[email protected]>
Date:   Fri Nov 14 04:33:02 2025 -0500

    Add updates from the development branch.
    
    2025-11-10   Michael Meissner  <[email protected]>
    
    gcc/
    
            * config/rs6000/rs6000.cc (rs6000_option_override_internal): Don't 
allow
            -mfloat16 on big endian systems.
    
    libgcc/
    
            * config/rs6000/sfp-machine.h: Delete final blank lines.

Diff:
---
 gcc/config/rs6000/rs6000.cc        | 13 ++++++++-----
 libgcc/config/rs6000/sfp-machine.h |  2 --
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
index 9c43d7be9d09..74b84d1770d4 100644
--- a/gcc/config/rs6000/rs6000.cc
+++ b/gcc/config/rs6000/rs6000.cc
@@ -4006,14 +4006,17 @@ rs6000_option_override_internal (bool global_init_p)
        }
     }
 
-  /* -mfloat16 needs power8 at a minimum in order to load up 16-bit values into
-      vector registers via loads/stores from GPRs and then using direct
-      moves.  */
-  if (TARGET_FLOAT16 && !TARGET_POWER8)
+  /* 16-bit floating point needs 64-bit power8 at a minimum in order to load up
+     16-bit values into vector registers via loads/stores from GPRs and then
+     using direct moves.  Don't allow 16-bit float on big endian systems at the
+     current time.  */
+  if (TARGET_FLOAT16 && (!TARGET_DIRECT_MOVE_64BIT || BYTES_BIG_ENDIAN))
     {
       rs6000_isa_flags &= ~OPTION_MASK_FLOAT16;
       if (rs6000_isa_flags_explicit & OPTION_MASK_FLOAT16)
-       error ("%qs requires at least %qs", "-mfloat16", "-mcpu=power8");
+       error ("%qs is only available on 64-bit little endian systems "
+              "that use at least %qs",
+              "-mfloat16", "-mcpu=power8");
     }
 
   /* If hard-float/altivec/vsx were explicitly turned off then don't allow
diff --git a/libgcc/config/rs6000/sfp-machine.h 
b/libgcc/config/rs6000/sfp-machine.h
index 642d2fc4f215..b6dd03a710e3 100644
--- a/libgcc/config/rs6000/sfp-machine.h
+++ b/libgcc/config/rs6000/sfp-machine.h
@@ -209,5 +209,3 @@ extern BFtype2 __truncsfbf2 (SFtype2);
 extern HFtype2 __truncbfhf2 (BFtype2);
 extern BFtype2 __trunchfbf2 (HFtype2);
 #endif
-
-

Reply via email to