patches/glibc/2.7/290-powerpc-8xx-CPU15-errata.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun May 03 09:50:16 2009 +0000 (2009-05-03)
branchnewlib
changeset 1366 5e5d1e6f55d3
parent 966 b6eec1274efb
permissions -rw-r--r--
Update the newlib devel branch with stuff from /trunk@1498.

-------- diffstat follows --------
/devel/newlib/configure | 336 176 160 0 +++++++------
/devel/newlib/Makefile.in | 12 3 9 0 -
/devel/newlib/scripts/build/kernel/linux.sh | 2 1 1 0
/devel/newlib/scripts/build/internals.sh | 1 0 1 0 -
/devel/newlib/scripts/build/libc/eglibc.sh | 1 0 1 0 -
/devel/newlib/scripts/build/mpfr.sh | 2 1 1 0
/devel/newlib/scripts/functions | 111 5 106 0 ----
/devel/newlib/scripts/config.guess | 7 5 2 0 +
/devel/newlib/scripts/config.sub | 3 2 1 0 +
/devel/newlib/scripts/saveSample.sh.in | 4 2 2 0
/devel/newlib/docs/overview.txt | 8 6 2 0 +
/devel/newlib/samples/armeb-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/sh4-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/x86_64-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-elf/crosstool.config | 12 3 9 0 -
/devel/newlib/samples/armeb-unknown-eabi/crosstool.config | 2 0 2 0 -
/devel/newlib/samples/arm-unknown-linux-gnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/ia64-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/x86_64-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/armeb-unknown-linux-gnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-e500v2-linux-gnuspe/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/i686-nptl-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/mips-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-iphone-linux-gnueabi/crosstool.config | 8 4 4 0
/devel/newlib/samples/armeb-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/i586-geode-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/mips-unknown-elf/crosstool.config | 2 0 2 0 -
/devel/newlib/samples/powerpc-405-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-eabi/crosstool.config | 12 3 9 0 -
/devel/newlib/samples/mipsel-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc64-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/alphaev56-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-860-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/config/kernel/linux.in | 108 2 106 0 ----
/devel/newlib/config/global/ct-behave.in | 22 13 9 0 +
/devel/newlib/config/global/download.in | 210 15 195 0 +-------
/devel/newlib/config/libc/glibc.in | 7 7 0 0 +
/devel/newlib/config/libc/glibc-eglibc.in-common | 15 14 1 0 +
45 files changed, 382 insertions(+), 839 deletions(-)
yann@966
     1
Fix memset on PowerPC 8xx, by Nye Liu:
yann@966
     2
http://sourceware.org/ml/crossgcc/2008-10/msg00067.html
yann@966
     3
yann@966
     4
Quote:
yann@966
     5
 I am working on a powerpc 860 toolchain, but I am having problems  
yann@966
     6
 convincing glibc to not emit code that uses the dcbz instruction (CPU15  
yann@966
     7
 dcbX bug). The source of the problem is sysdeps/powerpc/power3/memset.S
yann@966
     8
yann@966
     9
--- glibc-2.7/sysdeps/powerpc/powerpc32/memset.S	2007-03-26 13:09:07.000000000 -0700
yann@1016
    10
+++ glibc-2.7/sysdeps/powerpc/powerpc32/memset.S.new	2008-10-23 20:28:52.000000000 -0700
yann@966
    11
@@ -112,11 +112,13 @@
yann@966
    12
 	clrrwi.	rALIGN, rLEN, 5
yann@966
    13
 	mtcrf	0x01, rLEN	/* 40th instruction from .align */
yann@966
    14
 
yann@966
    15
+#ifndef BROKEN_PPC_8xx_CPU15
yann@966
    16
 /* Check if we can use the special case for clearing memory using dcbz.
yann@966
    17
    This requires that we know the correct cache line size for this
yann@966
    18
    processor.  Getting the __cache_line_size may require establishing GOT
yann@966
    19
    addressability, so branch out of line to set this up.  */
yann@966
    20
 	beq	cr1, L(checklinesize)
yann@966
    21
+#endif
yann@966
    22
 
yann@966
    23
 /* Store blocks of 32-bytes (256-bits) starting on a 32-byte boundary.
yann@966
    24
    Can't assume that rCHR is zero or that the cache line size is either
yann@1016
    25
@@ -158,6 +160,7 @@
yann@1016
    26
 	add	rMEMP, rMEMP, rALIGN
yann@1016
    27
 	b	L(medium_tail2)	/* 72nd instruction from .align */
yann@1016
    28
 
yann@1016
    29
+#ifndef BROKEN_PPC_8xx_CPU15
yann@1016
    30
 	.align	5
yann@1016
    31
 	nop
yann@1016
    32
 /* Clear cache lines of memory in 128-byte chunks.
yann@1016
    33
@@ -191,6 +194,7 @@
yann@1016
    34
 	bdnz	L(zloop)
yann@1016
    35
 	beqlr	cr5
yann@1016
    36
 	b	L(medium_tail2)
yann@1016
    37
+#endif /* ! BROKEN_PPC_8xx_CPU15 */
yann@1016
    38
 
yann@1016
    39
 	.align	5
yann@1016
    40
 L(small):
yann@1016
    41
@@ -248,6 +252,7 @@
yann@966
    42
 	stw	rCHR, -8(rMEMP)
yann@966
    43
 	blr
yann@966
    44
 
yann@966
    45
+#ifndef BROKEN_PPC_8xx_CPU15
yann@966
    46
 L(checklinesize):
yann@966
    47
 #ifdef SHARED
yann@966
    48
 	mflr	rTMP
yann@1016
    49
@@ -329,6 +334,7 @@
yann@966
    50
 L(handletail32):
yann@966
    51
 	clrrwi.	rALIGN, rLEN, 5
yann@966
    52
 	b	L(nondcbz)
yann@966
    53
+#endif /* ! BROKEN_PPC_8xx_CPU15 */
yann@966
    54
 
yann@966
    55
 END (BP_SYM (memset))
yann@966
    56
 libc_hidden_builtin_def (memset)