Hi,

Below patch aims to fix PR126438. I have only built the cross-compiler with
target powerpc64-apple-darwin9 on host x86_64-linux-gnu, but not bootstrapped
and regtested it as I do not have the platform for it. Some help would be
appreciated.
Kindly review. Since there is an issue in building the compiler itself, In
addition to trunk I would ask an approval for gcc-16.

Thanks and regards,
Avinash Jayakar

Darwin maintains a separate array of register_names where the Dense Math
Registers were not added. This caused an ICE when building the darwin
cross compiler as reported in PR126438. This patch adds dense math
registers to the REGISTER_NAMES array to fix this issue.

2026-07-29  Avinash Jayakar  <[email protected]>

gcc/ChangeLog:
        PR target/126438
        * config/rs6000/darwin.h (REGISTER_NAMES): Add dmf registers.
---
 gcc/config/rs6000/darwin.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h
index 175b6b1c3e0..8614052d8ca 100644
--- a/gcc/config/rs6000/darwin.h
+++ b/gcc/config/rs6000/darwin.h
@@ -295,7 +295,9 @@
   /* cr0..cr7 */                                                       \
     "cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7",            \
   /* vrsave vscr sfp */                                                        
\
-    "vrsave", "vscr", "sfp"                                            \
+    "vrsave", "vscr", "sfp",                                           \
+  /* DMRs */                                                           \
+      "dm0", "dm1", "dm2", "dm3", "dm4", "dm5", "dm6", "dm7"   \
 }
 
 /* This outputs NAME to FILE.  */
-- 
2.54.0

Reply via email to