diff mbox series

S390: Don't use r11 for cu-instructions as used as frame-pointer. [BZ# 32192]

Message ID 20240927082629.1155332-1-stli@linux.ibm.com
State New
Headers show
Series S390: Don't use r11 for cu-instructions as used as frame-pointer. [BZ# 32192] | expand

Commit Message

Stefan Liebler Sept. 27, 2024, 8:26 a.m. UTC
Building the s390 specific iconv modules - utf16-utf32-z9.c, utf8-utf32-z9.c
and utf8-utf16-z9.c - with -fno-omit-frame-pointer leads to a build error
"error: %r11 cannot be used in 'asm' here" as r11 is needed as frame-pointer.

The cuXY-instructions need two even-odd register pairs. Therefore the register
pinning is used. This patch just uses a different register pair.
---
 sysdeps/s390/utf16-utf32-z9.c |  8 ++++----
 sysdeps/s390/utf8-utf16-z9.c  | 12 ++++++------
 sysdeps/s390/utf8-utf32-z9.c  | 12 ++++++------
 3 files changed, 16 insertions(+), 16 deletions(-)

Comments

Florian Weimer Sept. 30, 2024, 1:14 p.m. UTC | #1
* Stefan Liebler:

> Building the s390 specific iconv modules - utf16-utf32-z9.c, utf8-utf32-z9.c
> and utf8-utf16-z9.c - with -fno-omit-frame-pointer leads to a build error
> "error: %r11 cannot be used in 'asm' here" as r11 is needed as frame-pointer.
>
> The cuXY-instructions need two even-odd register pairs. Therefore the register
> pinning is used. This patch just uses a different register pair.
> ---
>  sysdeps/s390/utf16-utf32-z9.c |  8 ++++----
>  sysdeps/s390/utf8-utf16-z9.c  | 12 ++++++------
>  sysdeps/s390/utf8-utf32-z9.c  | 12 ++++++------
>  3 files changed, 16 insertions(+), 16 deletions(-)

Looks reasonable to me.

Reviewed-by: Florian Weimer <fweimer@redhat.com>

Thanks,
Florian
diff mbox series

Patch

diff --git a/sysdeps/s390/utf16-utf32-z9.c b/sysdeps/s390/utf16-utf32-z9.c
index 51dd979607..9ac8a82df8 100644
--- a/sysdeps/s390/utf16-utf32-z9.c
+++ b/sysdeps/s390/utf16-utf32-z9.c
@@ -397,8 +397,8 @@  gconv_end (struct __gconv_step *data)
   {									\
     register const unsigned char* pInput asm ("8") = inptr;		\
     register size_t inlen asm ("9") = inend - inptr;			\
-    register unsigned char* pOutput asm ("10") = outptr;		\
-    register size_t outlen asm ("11") = outend - outptr;		\
+    register unsigned char* pOutput asm ("6") = outptr;			\
+    register size_t outlen asm ("7") = outend - outptr;			\
     unsigned long tmp, tmp2, tmp3;					\
     asm volatile (".machine push\n\t"					\
 		  ".machine \"z13\"\n\t"				\
@@ -707,8 +707,8 @@  gconv_end (struct __gconv_step *data)
   {									\
     register const unsigned char* pInput asm ("8") = inptr;		\
     register size_t inlen asm ("9") = inend - inptr;			\
-    register unsigned char* pOutput asm ("10") = outptr;		\
-    register size_t outlen asm ("11") = outend - outptr;		\
+    register unsigned char* pOutput asm ("6") = outptr;			\
+    register size_t outlen asm ("7") = outend - outptr;			\
     unsigned long tmp, tmp2, tmp3;					\
     asm volatile (".machine push\n\t"					\
 		  ".machine \"z13\"\n\t"				\
diff --git a/sysdeps/s390/utf8-utf16-z9.c b/sysdeps/s390/utf8-utf16-z9.c
index 421747f058..d19fc3c97b 100644
--- a/sysdeps/s390/utf8-utf16-z9.c
+++ b/sysdeps/s390/utf8-utf16-z9.c
@@ -170,8 +170,8 @@  gconv_end (struct __gconv_step *data)
   {									\
     register const unsigned char* pInput __asm__ ("8") = inptr;		\
     register size_t inlen __asm__ ("9") = inend - inptr;		\
-    register unsigned char* pOutput __asm__ ("10") = outptr;		\
-    register size_t outlen __asm__("11") = outend - outptr;		\
+    register unsigned char* pOutput __asm__ ("6") = outptr;		\
+    register size_t outlen __asm__("7") = outend - outptr;		\
     unsigned long cc = 0;						\
 									\
     __asm__ __volatile__ (".machine push       \n\t"			\
@@ -242,8 +242,8 @@  gconv_end (struct __gconv_step *data)
   {									\
     register const unsigned char* pInput asm ("8") = inptr;		\
     register size_t inlen asm ("9") = inend - inptr;			\
-    register unsigned char* pOutput asm ("10") = outptr;		\
-    register size_t outlen asm("11") = outend - outptr;			\
+    register unsigned char* pOutput asm ("6") = outptr;			\
+    register size_t outlen asm("7") = outend - outptr;			\
     unsigned long tmp, tmp2, tmp3;					\
     asm volatile (".machine push\n\t"					\
 		  ".machine \"z13\"\n\t"				\
@@ -818,8 +818,8 @@  gconv_end (struct __gconv_step *data)
   {									\
     register const unsigned char* pInput asm ("8") = inptr;		\
     register size_t inlen asm ("9") = inend - inptr;			\
-    register unsigned char* pOutput asm ("10") = outptr;		\
-    register size_t outlen asm ("11") = outend - outptr;		\
+    register unsigned char* pOutput asm ("6") = outptr;			\
+    register size_t outlen asm ("7") = outend - outptr;			\
     unsigned long tmp, tmp2, tmp3;					\
     asm volatile (".machine push\n\t"					\
 		  ".machine \"z13\"\n\t"				\
diff --git a/sysdeps/s390/utf8-utf32-z9.c b/sysdeps/s390/utf8-utf32-z9.c
index 9c4189a5f0..e4323d634c 100644
--- a/sysdeps/s390/utf8-utf32-z9.c
+++ b/sysdeps/s390/utf8-utf32-z9.c
@@ -170,8 +170,8 @@  gconv_end (struct __gconv_step *data)
   {									\
     register const unsigned char* pInput __asm__ ("8") = inptr;		\
     register size_t inlen __asm__ ("9") = inend - inptr;		\
-    register unsigned char* pOutput __asm__ ("10") = outptr;		\
-    register size_t outlen __asm__("11") = outend - outptr;		\
+    register unsigned char* pOutput __asm__ ("6") = outptr;		\
+    register size_t outlen __asm__("7") = outend - outptr;		\
     unsigned long cc = 0;						\
 									\
     __asm__ __volatile__ (".machine push       \n\t"			\
@@ -475,8 +475,8 @@  gconv_end (struct __gconv_step *data)
   {									\
     register const unsigned char* pInput asm ("8") = inptr;		\
     register size_t inlen asm ("9") = inend - inptr;			\
-    register unsigned char* pOutput asm ("10") = outptr;		\
-    register size_t outlen asm("11") = outend - outptr;			\
+    register unsigned char* pOutput asm ("6") = outptr;		\
+    register size_t outlen asm("7") = outend - outptr;			\
     unsigned long tmp, tmp2, tmp3;					\
     asm volatile (".machine push\n\t"					\
 		  ".machine \"z13\"\n\t"				\
@@ -864,8 +864,8 @@  gconv_end (struct __gconv_step *data)
   {									\
     register const unsigned char* pInput asm ("8") = inptr;		\
     register size_t inlen asm ("9") = inend - inptr;			\
-    register unsigned char* pOutput asm ("10") = outptr;		\
-    register size_t outlen asm ("11") = outend - outptr;		\
+    register unsigned char* pOutput asm ("6") = outptr;			\
+    register size_t outlen asm ("7") = outend - outptr;			\
     unsigned long tmp, tmp2;						\
     asm volatile (".machine push\n\t"					\
 		  ".machine \"z13\"\n\t"				\