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

2011-02-18 Thread Matthias Klose

On 17.02.2011 22:53, Sebastian Andrzej Siewior wrote:

* Matthias Klose | 2011-02-16 23:25:53 [+0100]:


- powerpc_remove_many.diff
   this helps to to detect opcodes which are not part of the current
   CPU because without -many gas won't touch them. This currently could
   break the kernel build as the 603 on steroids cpus use performance
   counter opcodes which are not available on the steroid less 603 core.


no space at end of spec?


I can't follow. It ended with -many and there was space at the end. I
could end one unless you are talking about something else.


could you just attach a debdiff against -12? same for the gcc-4.5 package 
please.

Sure thing. I attached 4.4, 4.5 will follow tomorrow.


ahh, and I forgot to ask about the gcc-4.6 package.



--
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4d5e5ac7.9010...@debian.org



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

2011-02-17 Thread Sebastian Andrzej Siewior
* Matthias Klose | 2011-02-16 23:25:53 [+0100]:

- powerpc_remove_many.diff
   this helps to to detect opcodes which are not part of the current
   CPU because without -many gas won't touch them. This currently could
   break the kernel build as the 603 on steroids cpus use performance
   counter opcodes which are not available on the steroid less 603 core.

no space at end of spec?

I can't follow. It ended with -many and there was space at the end. I
could end one unless you are talking about something else.

could you just attach a debdiff against -12? same for the gcc-4.5 package 
please.
Sure thing. I attached 4.4, 4.5 will follow tomorrow.

thanks, Matthias

Sebastian
diff -u gcc-4.4-4.4.5/debian/rules.patch gcc-4.4-4.4.5/debian/rules.patch
--- gcc-4.4-4.4.5/debian/rules.patch
+++ gcc-4.4-4.4.5/debian/rules.patch
@@ -82,6 +82,9 @@
linux-atomic-builtin-expect \
mips-fix-loongson2f-nop$(if $(with_linaro_branch),-linaro) \
gcc-system-root \
+   no_fpr_in_libgcc \
+   powerpc_remove_many \
+   pr44364 \
 
 ifneq ($(with_linaro_branch),yes)
   debian_patches += \
diff -u gcc-4.4-4.4.5/debian/changelog gcc-4.4-4.4.5/debian/changelog
--- gcc-4.4-4.4.5/debian/changelog
+++ gcc-4.4-4.4.5/debian/changelog
@@ -1,3 +1,13 @@
+gcc-4.4 (4.4.5-13) unstable; 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)
+
+ -- Sebastian Andrzej Siewior sebast...@breakpoint.cc  Thu, 17 Feb 2011 
22:27:30 +0100
+
 gcc-4.4 (4.4.5-12) unstable; urgency=medium
 
   * Fix build failure on ia64.
only in patch2:
unchanged:
--- gcc-4.4-4.4.5.orig/debian/patches/powerpc_remove_many.diff
+++ gcc-4.4-4.4.5/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.4.5/src/gcc/config/rs6000/rs6000.h
+===
+--- gcc-4.4.5.orig/src/gcc/config/rs6000/rs6000.h  2009-04-10 
01:23:07.0 +0200
 gcc-4.4.5/src/gcc/config/rs6000/rs6000.h   2011-02-13 17:57:17.0 
+0100
+@@ -83,6 +83,12 @@
+ #define ASM_CPU_POWER7_SPEC -mpower4 -maltivec
+ #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.  */
+ #define ASM_CPU_SPEC \
+@@ -147,7 +153,8 @@
+ %{mcpu=e300c3: -me300} \
+ %{mcpu=e500mc: -me500mc} \
+ %{maltivec: -maltivec} \
+--many
++ \
++ASM_CPU_SPU_MANY_NOT_SPE
+ 
+ #define CPP_DEFAULT_SPEC 
+ 
only in patch2:
unchanged:
--- gcc-4.4-4.4.5.orig/debian/patches/no_fpr_in_libgcc.diff
+++ gcc-4.4-4.4.5/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.0 +0100
 gcc-4.4.5/src/gcc/config/rs6000/crtresfpr.asm  2011-02-13 
17:26:14.0 +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.asm2011-02-13 
17:25:36.0 +0100
 gcc-4.4.5/src/gcc/config/rs6000/crtresxfpr.asm 2011-02-13 
17:26:29.0 +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.0 +0100
 

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

2011-02-16 Thread Sebastian Andrzej Siewior
Okay, I finally made it. Here is my list of gcc for powerpcspe:
- no_fpr_in_libgcc.diff
  It does not really harm by including them since nobody should use them
  but gas does not wont to assmebly hard float since they are not
  available on this cpu. Upstream did respond.
  
- powerpc_remove_many.diff
  this helps to to detect opcodes which are not part of the current
  CPU because without -many gas won't touch them. This currently could
  break the kernel build as the 603 on steroids cpus use performance
  counter opcodes which are not available on the steroid less 603 core.

- pr44364.diff
  This patch made it into trunk. I don't get it into the 4.4 branch
  because I can't prove that it is a regression since 4.3. If you worry
  about caller-save.c changes I could ifdef __SPE__ them.

I dropped pr44606 because I saw it in svn-updates.diff as of the -12
release. I also dropped the lwsync  eieio patches because this
nightmare is allready addressed in gas.

Sebastian
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.0 +0100
+++ gcc-4.4.5/src/gcc/config/rs6000/crtresfpr.asm   2011-02-13 
17:26:14.0 +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.0 +0100
+++ gcc-4.4.5/src/gcc/config/rs6000/crtresxfpr.asm  2011-02-13 
17:26:29.0 +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.0 +0100
+++ gcc-4.4.5/src/gcc/config/rs6000/crtsavfpr.asm   2011-02-13 
17:26:42.0 +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
Subject: [PATCH] remove -many on __SPE__ target

Signed-off-by: Sebastian Andrzej Siewior sebast...@breakpoint.cc
---

Index: gcc-4.4.5/src/gcc/config/rs6000/rs6000.h
===
--- gcc-4.4.5.orig/src/gcc/config/rs6000/rs6000.h   2009-04-10 
01:23:07.0 +0200
+++ gcc-4.4.5/src/gcc/config/rs6000/rs6000.h2011-02-13 17:57:17.0 
+0100
@@ -83,6 +83,12 @@
 #define ASM_CPU_POWER7_SPEC -mpower4 -maltivec
 #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.  */
 #define ASM_CPU_SPEC \
@@ -147,7 +153,8 @@
 %{mcpu=e300c3: -me300} \
 %{mcpu=e500mc: -me500mc} \
 %{maltivec: -maltivec} \
--many
+ \
+ASM_CPU_SPU_MANY_NOT_SPE
 
 #define CPP_DEFAULT_SPEC 
 
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 @@

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

2011-02-16 Thread Matthias Klose

On 16.02.2011 22:44, Sebastian Andrzej Siewior wrote:

Okay, I finally made it. Here is my list of gcc for powerpcspe:
- no_fpr_in_libgcc.diff
   It does not really harm by including them since nobody should use them
   but gas does not wont to assmebly hard float since they are not
   available on this cpu. Upstream did respond.


please provide # DP: lines in the patch (same for the others).


- powerpc_remove_many.diff
   this helps to to detect opcodes which are not part of the current
   CPU because without -many gas won't touch them. This currently could
   break the kernel build as the 603 on steroids cpus use performance
   counter opcodes which are not available on the steroid less 603 core.


no space at end of spec?


- pr44364.diff
   This patch made it into trunk. I don't get it into the 4.4 branch
   because I can't prove that it is a regression since 4.3. If you worry
   about caller-save.c changes I could ifdef __SPE__ them.

I dropped pr44606 because I saw it in svn-updates.diff as of the -12
release. I also dropped the lwsync  eieio patches because this
nightmare is allready addressed in gas.


could you just attach a debdiff against -12? same for the gcc-4.5 package 
please.

thanks, Matthias



--
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4d5c4ef1.7060...@debian.org