This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] S/390: Use .machine to prevent AS from complaining aboutz9-109 instructions in iconv modules


Hi,

as Ulrich proposed in:
http://sources.redhat.com/ml/libc-alpha/2011-04/msg00003.html

I'm now using the .machine "cpu" pseudo op to prevent AS from
complaining about the z9-109 asm instructions in the iconv modules.

I've ported the Power Binutils .machine implementation to S/390:
http://sourceware.org/ml/binutils/2011-04/msg00191.html

Tested on s390x. No regressions.

Please apply if ok.

Bye,

-Andreas-


2011-04-13  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* sysdeps/s390/s390-64/utf16-utf32-z9.c: Wrap the z9-109
	instructions into .machine "z9-109".
	* 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
@@ -169,7 +169,10 @@ gconv_end (struct __gconv_step *data)
     register unsigned long long outlen asm("11") = outend - outptr;	\
     uint64_t cc = 0;							\
 									\
-    asm volatile ("0: " INSTRUCTION "  \n\t"				\
+    asm volatile (".machine push       \n\t"				\
+                  ".machine \"z9-109\" \n\t"				\
+		  "0: " INSTRUCTION "  \n\t"				\
+                  ".machine pop        \n\t"				\
                   "   jo     0b        \n\t"				\
 		  "   ipm    %2        \n"			        \
 		  : "+a" (pOutput), "+a" (pInput), "+d" (cc),		\
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
@@ -151,7 +151,10 @@ gconv_end (struct __gconv_step *data)
     register unsigned long long outlen asm("11") = outend - outptr;	\
     uint64_t cc = 0;							\
 									\
-    asm volatile ("0: " INSTRUCTION "  \n\t"				\
+    asm volatile (".machine push       \n\t"				\
+                  ".machine \"z9-109\" \n\t"				\
+		  "0: " INSTRUCTION "  \n\t"				\
+                  ".machine pop        \n\t"				\
                   "   jo     0b        \n\t"				\
 		  "   ipm    %2        \n"			        \
 		  : "+a" (pOutput), "+a" (pInput), "+d" (cc),		\
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
@@ -155,7 +155,10 @@ gconv_end (struct __gconv_step *data)
     register unsigned long long outlen asm("11") = outend - outptr;	\
     uint64_t cc = 0;							\
 									\
-    asm volatile ("0: " INSTRUCTION "  \n\t"				\
+    asm volatile (".machine push       \n\t"				\
+                  ".machine \"z9-109\" \n\t"				\
+		  "0: " INSTRUCTION "  \n\t"				\
+                  ".machine pop        \n\t"				\
                   "   jo     0b        \n\t"				\
 		  "   ipm    %2        \n"				\
 		  : "+a" (pOutput), "+a" (pInput), "+d" (cc),		\


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]