public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo commit in src/patchsets/glibc/2.11.1: 6305_all_glibc-2.11-s390-older-binutils.patch README.history
@ 2012-02-16  2:55 Mike Frysinger (vapier)
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger (vapier) @ 2012-02-16  2:55 UTC (permalink / raw
  To: gentoo-commits

vapier      12/02/16 02:55:15

  Modified:             README.history
  Added:                6305_all_glibc-2.11-s390-older-binutils.patch
  Log:
  add patch for s390 with older binutils from upstream #365999 by Alon Bar-Lev and #403713 by Raúl Porcel

Revision  Changes    Path
1.5                  src/patchsets/glibc/2.11.1/README.history

file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.11.1/README.history?rev=1.5&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.11.1/README.history?rev=1.5&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.11.1/README.history?r1=1.4&r2=1.5

Index: README.history
===================================================================
RCS file: /var/cvsroot/gentoo/src/patchsets/glibc/2.11.1/README.history,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- README.history	7 Nov 2011 19:12:26 -0000	1.4
+++ README.history	16 Feb 2012 02:55:15 -0000	1.5
@@ -1,5 +1,6 @@
 2		[pending]
 	U 6028_all_alpha-fix-SOCK_NONBLOCK.patch
+	+ 6305_all_glibc-2.11-s390-older-binutils.patch
 	+ 6532_all_sparc64-tls-cross-test.patch
 
 1		25 Apr 2010



1.1                  src/patchsets/glibc/2.11.1/6305_all_glibc-2.11-s390-older-binutils.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.11.1/6305_all_glibc-2.11-s390-older-binutils.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.11.1/6305_all_glibc-2.11-s390-older-binutils.patch?rev=1.1&content-type=text/plain

Index: 6305_all_glibc-2.11-s390-older-binutils.patch
===================================================================
http://sourceware.org/ml/libc-alpha/2011-03/msg00038.html

From: "Andreas Krebbel" <krebbel@linux.vnet.ibm.com>
Date: Fri, 18 Mar 2011 11:20:22 +0100
To: libc-alpha@sourceware.org
Cc: aurelien@aurel32.net
Subject: [PATCH] S/390: UTF conversion modules - use .insn to avoid 'as' errors

Hi,

the attached patch fixes the problem mentioned by Aurelien in:
http://sources.redhat.com/ml/libc-alpha/2011-03/msg00000.html

The UTF conversion modules detect at runtime whether the conversion
instructions can be used or not.  So 'as' should not reject them when
building for a lower CPU level.  On the other hand it should
nevertheless be possible to build the modules optimizing for a higher
CPU level without as rejecting new instructions.  One way is to
introduce -march=all in 'as' in order to basically disable the
instruction checks. I've committed a patch to binutils introducing
-march=all so that it can be used in the future:

http://sourceware.org/ml/binutils/2011-03/msg00355.html

But we cannot use that option right now since it would bind glibc
build to upstream binutils.  For now I don't see a way around
replacing the mnemonics with .insn .

Done with the attached patch.  I've verified that the same binary code
is generated for the modules.

Bye,

-Andreas-


2011-03-18  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* sysdeps/s390/s390-64/utf16-utf32-z9.c: Replace UTF conversion
	mnemonics with .insn.
	* sysdeps/s390/s390-64/utf8-utf16-z9.c:	Likewise.
	* sysdeps/s390/s390-64/utf8-utf32-z9.c: Likewise.

Index: glibc/sysdeps/s390/s390-64/utf16-utf32-z9.c
===================================================================
--- glibc.orig/sysdeps/s390/s390-64/utf16-utf32-z9.c
+++ glibc/sysdeps/s390/s390-64/utf16-utf32-z9.c
@@ -208,7 +208,8 @@ gconv_end (struct __gconv_step *data)
        until this gets resolved.  */					\
     if (0) /* (GLRO (dl_hwcap) & HWCAP_S390_ETF3EH) */			\
       {									\
-	HARDWARE_CONVERT ("cu24 %0, %1, 1");				\
+	/* cu24 %0, %1, 1  */						\
+	HARDWARE_CONVERT (".insn rrf,0xb9b10000,%0,%1,1,0");		\
 	if (inptr != inend)						\
 	  {								\
 	    /* Check if the third byte is				\
@@ -278,7 +279,8 @@ gconv_end (struct __gconv_step *data)
   {									\
     if (GLRO (dl_hwcap) & HWCAP_S390_ETF3EH)				\
       {									\
-	HARDWARE_CONVERT ("cu42 %0, %1");				\
+	/* cu42 %0, %1  */						\
+	HARDWARE_CONVERT (".insn rre,0xb9b30000,%0,%1");		\
 									\
 	if (inptr != inend)						\
 	  {								\
Index: glibc/sysdeps/s390/s390-64/utf8-utf16-z9.c
===================================================================
--- glibc.orig/sysdeps/s390/s390-64/utf8-utf16-z9.c
+++ glibc/sysdeps/s390/s390-64/utf8-utf16-z9.c
@@ -186,7 +186,8 @@ gconv_end (struct __gconv_step *data)
   {									\
     if (GLRO (dl_hwcap) & HWCAP_S390_ETF3EH)				\
       {									\
-	HARDWARE_CONVERT ("cu12 %0, %1, 1");				\
+	/* cu12 %0, %1, 1  */						\
+	HARDWARE_CONVERT (".insn rrf,0xb2a70000,%0,%1,1,0");		\
 									\
 	if (inptr != inend)						\
 	  {								\
@@ -194,7 +195,7 @@ gconv_end (struct __gconv_step *data)
 	    for (i = 1; inptr + i < inend; ++i)				\
 	      if ((inptr[i] & 0xc0) != 0x80)				\
 		break;							\
-								\
+									\
 	    if (__builtin_expect (inptr + i == inend, 1))		\
 	      {								\
 		result = __GCONV_INCOMPLETE_INPUT;			\
@@ -350,7 +351,8 @@ gconv_end (struct __gconv_step *data)
        until this gets resolved.  */					\
     if (0) /* (GLRO (dl_hwcap) & HWCAP_S390_ETF3EH) */			\
       {									\
-	HARDWARE_CONVERT ("cu21 %0, %1, 1");				\
+	/* cu21 %0, %1, 1  */						\
+	HARDWARE_CONVERT (".insn rrf,0xb2a60000,%0,%1,1,0");		\
 	if (inptr != inend)						\
 	  {								\
 	    /* Check if the third byte is				\
Index: glibc/sysdeps/s390/s390-64/utf8-utf32-z9.c
===================================================================
--- glibc.orig/sysdeps/s390/s390-64/utf8-utf32-z9.c
+++ glibc/sysdeps/s390/s390-64/utf8-utf32-z9.c
@@ -190,7 +190,8 @@ gconv_end (struct __gconv_step *data)
   {									\
     if (GLRO (dl_hwcap) & HWCAP_S390_ETF3EH)				\
       {									\
-	HARDWARE_CONVERT ("cu14 %0, %1, 1");				\
+        /* cu14 %0, %1, 1  */						\
+	HARDWARE_CONVERT (".insn rrf,0xb9b00000,%0,%1,1,0");		\
 									\
 	if (inptr != inend)						\
 	  {								\
@@ -417,7 +418,8 @@ gconv_end (struct __gconv_step *data)
   {								\
     if (GLRO (dl_hwcap) & HWCAP_S390_ETF3EH)			\
       {								\
-	HARDWARE_CONVERT ("cu41 %0, %1");			\
+	/* cu41 %0, %1  */					\
+	HARDWARE_CONVERT (".insn rre,0xb9b20000,%0,%1");	\
 								\
 	if (inptr != inend)					\
 	  {							\






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-02-16  2:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-16  2:55 [gentoo-commits] gentoo commit in src/patchsets/glibc/2.11.1: 6305_all_glibc-2.11-s390-older-binutils.patch README.history Mike Frysinger (vapier)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox