Module Name:    src
Committed By:   matt
Date:           Sat Aug 23 02:17:47 UTC 2014

Modified Files:
        src/external/gpl3/gcc/dist/gcc/config/rs6000: netbsd.h netbsd64.h
            rs6000.c t-netbsd64

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


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
    src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd.h \
    src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c
cvs rdiff -u -r1.7 -r1.8 \
    src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h
cvs rdiff -u -r1.1 -r1.2 \
    src/external/gpl3/gcc/dist/gcc/config/rs6000/t-netbsd64

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd.h
diff -u src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd.h:1.6 src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd.h:1.7
--- src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd.h:1.6	Fri Aug 22 06:51:34 2014
+++ src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd.h	Sat Aug 23 02:17:47 2014
@@ -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)
 
Index: src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c
diff -u src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c:1.6 src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c:1.7
--- src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c:1.6	Tue May 27 09:18:54 2014
+++ src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c	Sat Aug 23 02:17:47 2014
@@ -3492,7 +3492,8 @@ rs6000_option_override_internal (bool gl
 	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 @@ rs6000_savres_routine_name (rs6000_stack
     }
   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 @@ rs6000_savres_routine_name (rs6000_stack
 		  : ((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 @@ rs6000_elf_file_end (void)
 		 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

Index: src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h
diff -u src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.7 src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.8
--- src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.7	Fri Aug 22 06:52:37 2014
+++ src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h	Sat Aug 23 02:17:47 2014
@@ -301,6 +301,8 @@ extern int dot_symbols;
   do							\
     {							\
       NETBSD_OS_CPP_BUILTINS_ELF();			\
+      if (TARGET_ISEL)					\
+	builtin_define ("__PPC_ISEL__");		\
       if (TARGET_64BIT)					\
 	{						\
 	  builtin_define ("__PPC__");			\
@@ -386,9 +388,7 @@ extern int dot_symbols;
 #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

Index: src/external/gpl3/gcc/dist/gcc/config/rs6000/t-netbsd64
diff -u src/external/gpl3/gcc/dist/gcc/config/rs6000/t-netbsd64:1.1 src/external/gpl3/gcc/dist/gcc/config/rs6000/t-netbsd64:1.2
--- src/external/gpl3/gcc/dist/gcc/config/rs6000/t-netbsd64:1.1	Wed Jun 29 04:59:10 2011
+++ src/external/gpl3/gcc/dist/gcc/config/rs6000/t-netbsd64	Sat Aug 23 02:17:47 2014
@@ -6,13 +6,9 @@ LIB2FUNCS_EXTRA = $(srcdir)/config/rs600
 
 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)
 

Reply via email to