patches/glibc/2.7/240-sh-lowlevellock-asm.patch
author Anthony Foiani <anthony.foiani@gmail.com>
Thu May 19 23:06:16 2011 +0200 (2011-05-19)
changeset 2461 ec30b191f0e3
permissions -rw-r--r--
complibs/ppl: build only C and C++ interfaces for PPL

By default, PPL wants to build interfaces for any of a variety of
langauges it finds on the local host (python, java, possibly perl, also
more esoteric languages such as ocaml and prolog).

These extra interfaces can double the compile time for the library. For
single-process builds, I found a savings of more than 40%:

default / j1: 716s total, 143.2s avg, 0.52s stdev
just_c / j1: 406s total, 81.2s avg, 0.33s stdev
just_c_cpp / j1: 413s total, 82.6s avg, 0.22s stdev

And for multi-process builds, it approached 50%:

default / j4: 625s total, 125.0s avg, 0.57s stdev
just_c / j4: 338s total, 67.6s avg, 1.25s stdev
just_c_cpp / j4: 327s total, 65.4s avg, 0.36s stdev

Since the PPL we build within ct-ng is only used by GCC, we only need to
build the C and C++ interfaces.

Signed-Off-By: Anthony Foiani <anthony.foiani@gmail.com>
yann@962
     1
--- glibc-2.7/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S.orig	2007-08-03 16:44:15.000000000 +0100
yann@962
     2
+++ glibc-2.7/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S	2008-08-19 21:08:19.000000000 +0100
yann@962
     3
@@ -76,7 +76,7 @@
yann@962
     4
 	add	tmp2, tmp 	; \
yann@962
     5
 	mov.l	@tmp, tmp2	; \
yann@962
     6
 	bra	98f		; \
yann@962
     7
-	 mov	#FUTEX_PRIVATE_FLAG, tmp
yann@962
     8
+	 mov	#FUTEX_PRIVATE_FLAG, tmp ; \
yann@962
     9
 99:	.word	PRIVATE_FUTEX - TLS_PRE_TCB_SIZE ; \
yann@962
    10
 98:	extu.b	tmp, tmp	; \
yann@962
    11
 	xor	tmp, reg	; \
yann@962
    12
@@ -88,7 +88,7 @@
yann@962
    13
 	add	tmp2, tmp 	; \
yann@962
    14
 	mov.l	@tmp, tmp2	; \
yann@962
    15
 	bra	98f		; \
yann@962
    16
-	 mov	#FUTEX_PRIVATE_FLAG, tmp
yann@962
    17
+	 mov	#FUTEX_PRIVATE_FLAG, tmp ; \
yann@962
    18
 99:	.word	PRIVATE_FUTEX - TLS_PRE_TCB_SIZE ; \
yann@962
    19
 98:	extu.b	tmp, tmp	; \
yann@962
    20
 	xor	tmp, reg	; \
yann@962
    21
@@ -96,13 +96,13 @@
yann@962
    22
 	mov	#FUTEX_WAIT, tmp ; \
yann@962
    23
 	or	tmp, reg
yann@962
    24
 # endif
yann@962
    25
-# define LOAD_FUTEX_WAKE(reg,tmp) \
yann@962
    26
+# define LOAD_FUTEX_WAKE(reg,tmp,tmp2) \
yann@962
    27
 	stc	gbr, tmp	; \
yann@962
    28
 	mov.w	99f, tmp2	; \
yann@962
    29
 	add	tmp2, tmp 	; \
yann@962
    30
 	mov.l	@tmp, tmp2	; \
yann@962
    31
 	bra	98f		; \
yann@962
    32
-	 mov	#FUTEX_PRIVATE_FLAG, tmp
yann@962
    33
+	 mov	#FUTEX_PRIVATE_FLAG, tmp ; \
yann@962
    34
 99:	.word	PRIVATE_FUTEX - TLS_PRE_TCB_SIZE ; \
yann@962
    35
 98:	extu.b	tmp, tmp	; \
yann@962
    36
 	xor	tmp, reg	; \
yann@962
    37
--- glibc-2.7/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S.orig	2007-08-03 16:44:57.000000000 +0100
yann@962
    38
+++ glibc-2.7/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S	2008-08-19 21:08:22.000000000 +0100
yann@962
    39
@@ -42,7 +42,7 @@
yann@962
    40
 	add	tmp2, tmp 	; \
yann@962
    41
 	mov.l	@tmp, tmp2	; \
yann@962
    42
 	bra	98f		; \
yann@962
    43
-	 mov	#FUTEX_PRIVATE_FLAG, tmp
yann@962
    44
+	 mov	#FUTEX_PRIVATE_FLAG, tmp ; \
yann@962
    45
 99:	.word	PRIVATE_FUTEX - TLS_PRE_TCB_SIZE ; \
yann@962
    46
 98:	extu.b	tmp, tmp	; \
yann@962
    47
 	xor	tmp, reg	; \
yann@962
    48
@@ -54,7 +54,7 @@
yann@962
    49
 	add	tmp2, tmp 	; \
yann@962
    50
 	mov.l	@tmp, tmp2	; \
yann@962
    51
 	bra	98f		; \
yann@962
    52
-	 mov	#FUTEX_PRIVATE_FLAG, tmp
yann@962
    53
+	 mov	#FUTEX_PRIVATE_FLAG, tmp ; \
yann@962
    54
 99:	.word	PRIVATE_FUTEX - TLS_PRE_TCB_SIZE ; \
yann@962
    55
 98:	extu.b	tmp, tmp	; \
yann@962
    56
 	xor	tmp, reg	; \