Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gcc/dist/gcc/config/rs6000 Fix powerpc64 suppo...



details:   https://anonhg.NetBSD.org/src/rev/feaebcb79885
branches:  trunk
changeset: 801894:feaebcb79885
user:      matt <matt%NetBSD.org@localhost>
date:      Sat Aug 23 02:17:47 2014 +0000

description:
Fix powerpc64 support for NetBSD.
Add __PPC_ISEL__ to indicate cpu support the isel instruction

diffstat:

 external/gpl3/gcc/dist/gcc/config/rs6000/netbsd.h   |   2 ++
 external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h |   6 +++---
 external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c   |  12 ++++++++----
 external/gpl3/gcc/dist/gcc/config/rs6000/t-netbsd64 |  10 +++-------
 4 files changed, 16 insertions(+), 14 deletions(-)

diffs (98 lines):

diff -r 108df156537f -r feaebcb79885 external/gpl3/gcc/dist/gcc/config/rs6000/netbsd.h
--- a/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd.h Fri Aug 22 22:28:50 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd.h Sat Aug 23 02:17:47 2014 +0000
@@ -31,6 +31,8 @@
         builtin_define ("_SECURE_PLT");                \
       if (TARGET_SOFT_FLOAT)                   \
         builtin_define ("_SOFT_FLOAT");                \
+      if (TARGET_ISEL)                         \
+        builtin_define ("__PPC_ISEL__");       \
     }                                          \
   while (0)
 
diff -r 108df156537f -r feaebcb79885 external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h
--- a/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h       Fri Aug 22 22:28:50 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h       Sat Aug 23 02:17:47 2014 +0000
@@ -301,6 +301,8 @@
   do                                                   \
     {                                                  \
       NETBSD_OS_CPP_BUILTINS_ELF();                    \
+      if (TARGET_ISEL)                                 \
+       builtin_define ("__PPC_ISEL__");                \
       if (TARGET_64BIT)                                        \
        {                                               \
          builtin_define ("__PPC__");                   \
@@ -386,9 +388,7 @@
 #define        PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int")
 
 #undef WCHAR_TYPE
-#define        WCHAR_TYPE (TARGET_64BIT ? "int" : "long int")
-#undef  WCHAR_TYPE_SIZE
-#define WCHAR_TYPE_SIZE 32
+#define        WCHAR_TYPE "int"
 
 /* Override rs6000.h definition.  */
 #undef  ASM_APP_ON
diff -r 108df156537f -r feaebcb79885 external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c
--- a/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c Fri Aug 22 22:28:50 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c Sat Aug 23 02:17:47 2014 +0000
@@ -3492,7 +3492,8 @@
        rs6000_long_double_type_size = RS6000_DEFAULT_LONG_DOUBLE_SIZE;
     }
 
-#if !defined (POWERPC_LINUX) && !defined (POWERPC_FREEBSD)
+#if !defined (POWERPC_LINUX) && !defined (POWERPC_FREEBSD) \
+    && !defined (POWERPC_NETBSD)
   if (!global_options_set.x_rs6000_ieeequad)
     rs6000_ieeequad = 1;
 #endif
@@ -22500,7 +22501,8 @@
     }
   else if (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2)
     {
-#if !defined (POWERPC_LINUX) && !defined (POWERPC_FREEBSD)
+#if !defined (POWERPC_LINUX) && !defined (POWERPC_FREEBSD) \
+    && !defined(POWERPC_NETBSD)
       /* No out-of-line save/restore routines for GPRs on AIX.  */
       gcc_assert (!TARGET_AIX || (sel & SAVRES_REG) != SAVRES_GPR);
 #endif
@@ -22512,7 +22514,8 @@
                  : ((sel & SAVRES_LR) ? "_restgpr0_" : "_restgpr1_"));
       else if ((sel & SAVRES_REG) == SAVRES_FPR)
        {
-#if defined (POWERPC_LINUX) || defined (POWERPC_FREEBSD)
+#if defined (POWERPC_LINUX) || defined (POWERPC_FREEBSD) \
+    || defined (POWERPC_NETBSD)
          if ((sel & SAVRES_LR))
            prefix = ((sel & SAVRES_SAVE) ? "_savefpr_" : "_restfpr_");
          else
@@ -29135,7 +29138,8 @@
                 aix_struct_return ? 2 : 1);
     }
 #endif
-#if defined (POWERPC_LINUX) || defined (POWERPC_FREEBSD)
+#if defined (POWERPC_LINUX) || defined (POWERPC_FREEBSD) \
+    || defined (POWERPC_NETBSD)
   if (TARGET_32BIT || DEFAULT_ABI == ABI_ELFv2)
     file_end_indicate_exec_stack ();
 #endif
diff -r 108df156537f -r feaebcb79885 external/gpl3/gcc/dist/gcc/config/rs6000/t-netbsd64
--- a/external/gpl3/gcc/dist/gcc/config/rs6000/t-netbsd64       Fri Aug 22 22:28:50 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/rs6000/t-netbsd64       Sat Aug 23 02:17:47 2014 +0000
@@ -6,13 +6,9 @@
 
 TARGET_LIBGCC2_CFLAGS += -mno-minimal-toc
 
-MULTILIB_OPTIONS        = m64/m32 msoft-float
-MULTILIB_DIRNAMES       = 64 32 soft-float
-MULTILIB_EXTRA_OPTS     = fPIC mstrict-align
-MULTILIB_EXCEPTIONS     = m64/msoft-float
-MULTILIB_EXCLUSIONS     = m64/!m32/msoft-float
-# XXX this is wrong
-MULTILIB_OSDIRNAMES    = ../lib ../lib32 soft-float
+MULTILIB_OPTIONS        = m64/m32
+MULTILIB_DIRNAMES       = 64 32
+MULTILIB_OSDIRNAMES    = . ../lib/powerpc
 
 MULTILIB_MATCHES        = $(MULTILIB_MATCHES_FLOAT)
 



Home | Main Index | Thread Index | Old Index