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

Bug#611249: gcc-4.4: please update powerpcspe patches



* Matthias Klose | 2011-02-18 12:40:55 [+0100]:

>>Sure thing. I attached 4.4, 4.5 will follow tomorrow.
>
>ahh, and I forgot to ask about the gcc-4.6 package.

Attaching diff for 4.5 and 4.6.

Sebastian
diff -u gcc-4.5-4.5.2/debian/rules.patch gcc-4.5-4.5.2/debian/rules.patch
--- gcc-4.5-4.5.2/debian/rules.patch
+++ gcc-4.5-4.5.2/debian/rules.patch
@@ -50,9 +50,6 @@
   endif
 else
   debian_patches += gcc-hash-style-both
-  ifeq (,$(filter $(distrelease),etch lenny squeeze))
-    debian_patches += gcc-no-add-needed
-  endif
 endif
 
 debian_patches += \
@@ -77,6 +74,9 @@
 	linux-atomic-builtin-expect \
 	pr24619 \
 	pr45979 \
+	no_fpr_in_libgcc \
+	powerpc_remove_many \
+	pr44364 \
 
 #	libstdc++-nothumb-check \
 # TODO: update
diff -u gcc-4.5-4.5.2/debian/changelog gcc-4.5-4.5.2/debian/changelog
--- gcc-4.5-4.5.2/debian/changelog
+++ gcc-4.5-4.5.2/debian/changelog
@@ -1,3 +1,14 @@
+gcc-4.5 (4.5.2-4) experimental; urgency=low
+
+  [ Sebastian Andrzej Siewior ]
+  * PR target/44364
+  * Remove -many on powerpcspe (__SPE__)
+  * Remove classic FPU opcodes from libgcc if target has no support for them
+    (powerpcspe)
+  * remove gcc-no-add-needed.diff, it is added twice.
+
+ -- Sebastian Andrzej Siewior <sebastian@breakpoint.cc>  Fri, 18 Feb 2011 21:23:15 +0100
+
 gcc-4.5 (4.5.2-3) experimental; urgency=low
 
   * Update to SVN 20110215 (r170181) from the gcc-4_5-branch.
only in patch2:
unchanged:
--- gcc-4.5-4.5.2.orig/debian/patches/powerpc_remove_many.diff
+++ gcc-4.5-4.5.2/debian/patches/powerpc_remove_many.diff
@@ -0,0 +1,33 @@
+# DP: Subject: [PATCH] remove -many on __SPE__ target
+# DP: this helps to to detect opcodes which are not part of the current
+# DP: CPU because without -many gas won't touch them. This currently could
+# DP: break the kernel build as the 603 on steroids cpus use performance
+# DP: counter opcodes which are not available on the steroid less 603 core.
+
+Index: gcc-4.5.2/src/gcc/config/rs6000/rs6000.h
+===================================================================
+--- gcc-4.5.2.orig/src/gcc/config/rs6000/rs6000.h	2009-12-07 16:34:21.000000000 +0100
++++ gcc-4.5.2/src/gcc/config/rs6000/rs6000.h	2011-02-18 22:14:56.000000000 +0100
+@@ -89,6 +89,12 @@
+ #define ASM_CPU_476_SPEC "-mpower4"
+ #endif
+ 
++#ifndef __SPE__
++#define ASM_CPU_SPU_MANY_NOT_SPE "-many"
++#else
++#define ASM_CPU_SPU_MANY_NOT_SPE
++#endif
++
+ /* Common ASM definitions used by ASM_SPEC among the various targets for
+    handling -mcpu=xxx switches.  There is a parallel list in driver-rs6000.c to
+    provide the default assembler options if the user uses -mcpu=native, so if
+@@ -160,7 +166,8 @@
+ %{mcpu=e500mc: -me500mc} \
+ %{mcpu=e500mc64: -me500mc64} \
+ %{maltivec: -maltivec} \
+--many"
++" \
++ASM_CPU_SPU_MANY_NOT_SPE
+ 
+ #define CPP_DEFAULT_SPEC ""
+ 
only in patch2:
unchanged:
--- gcc-4.5-4.5.2.orig/debian/patches/no_fpr_in_libgcc.diff
+++ gcc-4.5-4.5.2/debian/patches/no_fpr_in_libgcc.diff
@@ -0,0 +1,55 @@
+# DP: It does not really harm by including them since nobody should use them
+# DP: but gas does not wont to assmebly hard float since they are not
+# DP: available on this cpu. Upstream did not respond.
+
+Index: gcc-4.4.5/src/gcc/config/rs6000/crtresfpr.asm
+===================================================================
+--- gcc-4.4.5.orig/src/gcc/config/rs6000/crtresfpr.asm	2011-02-13 17:25:36.000000000 +0100
++++ gcc-4.4.5/src/gcc/config/rs6000/crtresfpr.asm	2011-02-13 17:26:14.000000000 +0100
+@@ -33,6 +33,7 @@
+ 
+ /* On PowerPC64 Linux, these functions are provided by the linker.  */
+ #ifndef __powerpc64__
++#ifndef __NO_FPRS__
+ 
+ /* Routines for restoring floating point registers, called by the compiler.  */
+ /* Called with r11 pointing to the stack header word of the caller of the */
+@@ -77,3 +78,4 @@
+ FUNC_END(_restfpr_14)
+ 
+ #endif
++#endif
+Index: gcc-4.4.5/src/gcc/config/rs6000/crtresxfpr.asm
+===================================================================
+--- gcc-4.4.5.orig/src/gcc/config/rs6000/crtresxfpr.asm	2011-02-13 17:25:36.000000000 +0100
++++ gcc-4.4.5/src/gcc/config/rs6000/crtresxfpr.asm	2011-02-13 17:26:29.000000000 +0100
+@@ -33,6 +33,7 @@
+ 
+ /* On PowerPC64 Linux, these functions are provided by the linker.  */
+ #ifndef __powerpc64__
++#ifndef __NO_FPRS__
+ 
+ /* Routines for restoring floating point registers, called by the compiler.  */
+ /* Called with r11 pointing to the stack header word of the caller of the */
+@@ -82,3 +83,4 @@
+ FUNC_END(_restfpr_14_x)
+ 
+ #endif
++#endif
+Index: gcc-4.4.5/src/gcc/config/rs6000/crtsavfpr.asm
+===================================================================
+--- gcc-4.4.5.orig/src/gcc/config/rs6000/crtsavfpr.asm	2011-02-13 17:25:36.000000000 +0100
++++ gcc-4.4.5/src/gcc/config/rs6000/crtsavfpr.asm	2011-02-13 17:26:42.000000000 +0100
+@@ -33,6 +33,7 @@
+ 
+ /* On PowerPC64 Linux, these functions are provided by the linker.  */
+ #ifndef __powerpc64__
++#ifndef __NO_FPRS__
+ 
+ /* Routines for saving floating point registers, called by the compiler.  */
+ /* Called with r11 pointing to the stack header word of the caller of the */
+@@ -77,3 +78,4 @@
+ FUNC_END(_savefpr_14)
+ 
+ #endif
++#endif
only in patch2:
unchanged:
--- gcc-4.5-4.5.2.orig/debian/patches/pr44364.diff
+++ gcc-4.5-4.5.2/debian/patches/pr44364.diff
@@ -0,0 +1,40 @@
+# DP: This patch made it into trunk. I don't get it into the 4.4 branch
+# DP: because I can't prove that it is a regression since 4.3.
+
+Index: gcc/caller-save.c
+===================================================================
+--- a/src/gcc/caller-save.c	(revision 160245)
++++ b/src/gcc/caller-save.c	(working copy)
+@@ -1080,7 +1080,7 @@ insert_restore (struct insn_chain *chain
+       /* Check that insn to restore REGNO in save_mode[regno] is
+ 	 correct.  */
+       && reg_save_code (regno, save_mode[regno]) >= 0)
+-    mem = adjust_address (mem, save_mode[regno], 0);
++    mem = adjust_address_nv (mem, save_mode[regno], 0);
+   else
+     mem = copy_rtx (mem);
+ 
+@@ -1161,7 +1161,7 @@ insert_save (struct insn_chain *chain, i
+       /* Check that insn to save REGNO in save_mode[regno] is
+ 	 correct.  */
+       && reg_save_code (regno, save_mode[regno]) >= 0)
+-    mem = adjust_address (mem, save_mode[regno], 0);
++    mem = adjust_address_nv (mem, save_mode[regno], 0);
+   else
+     mem = copy_rtx (mem);
+ 
+Index: gcc/config/rs6000/e500.h
+===================================================================
+--- a/src/gcc/config/rs6000/e500.h	(revision 160245)
++++ b/src/gcc/config/rs6000/e500.h	(working copy)
+@@ -43,3 +43,10 @@
+ 	  error ("E500 and FPRs not supported");			\
+       }									\
+   } while (0)
++
++/* When setting up caller-save slots (MODE == VOIDmode) ensure we
++   allocate space for DFmode.  Save gprs in the correct mode too.  */
++#define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \
++  (TARGET_E500_DOUBLE && ((MODE) == VOIDmode || (MODE) == DFmode)	\
++   ? DFmode								\
++   : choose_hard_reg_mode ((REGNO), (NREGS), false))
diff -u gcc-4.6-4.6-20110216/debian/rules.patch gcc-4.6-4.6-20110216/debian/rules.patch
--- gcc-4.6-4.6-20110216/debian/rules.patch
+++ gcc-4.6-4.6-20110216/debian/rules.patch
@@ -66,6 +66,8 @@
 	pr24619 \
 	pr45979 \
 	gccgo-version \
+	no_fpr_in_libgcc \
+	powerpc_remove_many \
 
 #	libstdc++-nothumb-check \
 # TODO: update
diff -u gcc-4.6-4.6-20110216/debian/changelog gcc-4.6-4.6-20110216/debian/changelog
--- gcc-4.6-4.6-20110216/debian/changelog
+++ gcc-4.6-4.6-20110216/debian/changelog
@@ -1,3 +1,12 @@
+gcc-4.6 (4.6-20110216-2) experimental; urgency=low
+
+  [ Sebastian Andrzej Siewior ]
+  * Remove -many on powerpcspe (__SPE__)
+  * Remove classic FPU opcodes from libgcc if target has no support for them
+    (powerpcspe)
+
+ -- Sebastian Andrzej Siewior <sebastian@breakpoint.cc>  Fri, 18 Feb 2011 22:36:57 +0100
+
 gcc-4.6 (4.6-20110216-1) experimental; urgency=low
 
   * GCC snapshot, taken from the trunk.
only in patch2:
unchanged:
--- gcc-4.6-4.6-20110216.orig/debian/patches/powerpc_remove_many.diff
+++ gcc-4.6-4.6-20110216/debian/patches/powerpc_remove_many.diff
@@ -0,0 +1,33 @@
+# DP: Subject: [PATCH] remove -many on __SPE__ target
+# DP: this helps to to detect opcodes which are not part of the current
+# DP: CPU because without -many gas won't touch them. This currently could
+# DP: break the kernel build as the 603 on steroids cpus use performance
+# DP: counter opcodes which are not available on the steroid less 603 core.
+
+Index: gcc-4.6-4.6-20110216/src/gcc/config/rs6000/rs6000.h
+===================================================================
+--- gcc-4.6-4.6-20110216.orig/src/gcc/config/rs6000/rs6000.h	2011-02-03 17:20:04.000000000 +0100
++++ gcc-4.6-4.6-20110216/src/gcc/config/rs6000/rs6000.h	2011-02-18 22:44:31.000000000 +0100
+@@ -98,6 +98,12 @@
+ #define ASM_CPU_476_SPEC "-mpower4"
+ #endif
+ 
++#ifndef __SPE__
++#define ASM_CPU_SPU_MANY_NOT_SPE "-many"
++#else
++#define ASM_CPU_SPU_MANY_NOT_SPE
++#endif
++
+ /* Common ASM definitions used by ASM_SPEC among the various targets for
+    handling -mcpu=xxx switches.  There is a parallel list in driver-rs6000.c to
+    provide the default assembler options if the user uses -mcpu=native, so if
+@@ -170,7 +176,8 @@
+ %{mcpu=e500mc64: -me500mc64} \
+ %{maltivec: -maltivec} \
+ %{mvsx: -mvsx %{!maltivec: -maltivec} %{!mcpu*: %(asm_cpu_power7)}} \
+--many"
++" \
++ASM_CPU_SPU_MANY_NOT_SPE
+ 
+ #define CPP_DEFAULT_SPEC ""
+ 
only in patch2:
unchanged:
--- gcc-4.6-4.6-20110216.orig/debian/patches/no_fpr_in_libgcc.diff
+++ gcc-4.6-4.6-20110216/debian/patches/no_fpr_in_libgcc.diff
@@ -0,0 +1,55 @@
+# DP: It does not really harm by including them since nobody should use them
+# DP: but gas does not wont to assmebly hard float since they are not
+# DP: available on this cpu. Upstream did not respond.
+
+Index: gcc-4.6-4.6-20110216/src/gcc/config/rs6000/crtresfpr.asm
+===================================================================
+--- gcc-4.6-4.6-20110216.orig/src/gcc/config/rs6000/crtresfpr.asm	2011-02-18 22:42:07.000000000 +0100
++++ gcc-4.6-4.6-20110216/src/gcc/config/rs6000/crtresfpr.asm	2011-02-18 22:42:13.000000000 +0100
+@@ -33,6 +33,7 @@
+ 
+ /* On PowerPC64 Linux, these functions are provided by the linker.  */
+ #ifndef __powerpc64__
++#ifndef __NO_FPRS__
+ 
+ /* Routines for restoring floating point registers, called by the compiler.  */
+ /* Called with r11 pointing to the stack header word of the caller of the */
+@@ -79,3 +80,4 @@
+ CFI_ENDPROC
+ 
+ #endif
++#endif
+Index: gcc-4.6-4.6-20110216/src/gcc/config/rs6000/crtresxfpr.asm
+===================================================================
+--- gcc-4.6-4.6-20110216.orig/src/gcc/config/rs6000/crtresxfpr.asm	2011-02-18 22:42:07.000000000 +0100
++++ gcc-4.6-4.6-20110216/src/gcc/config/rs6000/crtresxfpr.asm	2011-02-18 22:42:13.000000000 +0100
+@@ -33,6 +33,7 @@
+ 
+ /* On PowerPC64 Linux, these functions are provided by the linker.  */
+ #ifndef __powerpc64__
++#ifndef __NO_FPRS__
+ 
+ /* Routines for restoring floating point registers, called by the compiler.  */
+ /* Called with r11 pointing to the stack header word of the caller of the */
+@@ -124,3 +125,4 @@
+ CFI_ENDPROC
+ 
+ #endif
++#endif
+Index: gcc-4.6-4.6-20110216/src/gcc/config/rs6000/crtsavfpr.asm
+===================================================================
+--- gcc-4.6-4.6-20110216.orig/src/gcc/config/rs6000/crtsavfpr.asm	2011-02-18 22:42:07.000000000 +0100
++++ gcc-4.6-4.6-20110216/src/gcc/config/rs6000/crtsavfpr.asm	2011-02-18 22:42:13.000000000 +0100
+@@ -33,6 +33,7 @@
+ 
+ /* On PowerPC64 Linux, these functions are provided by the linker.  */
+ #ifndef __powerpc64__
++#ifndef __NO_FPRS__
+ 
+ /* Routines for saving floating point registers, called by the compiler.  */
+ /* Called with r11 pointing to the stack header word of the caller of the */
+@@ -79,3 +80,4 @@
+ CFI_ENDPROC
+ 
+ #endif
++#endif

Reply to: