summaryrefslogtreecommitdiff
path: root/sysdeps/s390/s390-64/utf8-utf16-z9.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/s390/s390-64/utf8-utf16-z9.c')
-rw-r--r--sysdeps/s390/s390-64/utf8-utf16-z9.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/sysdeps/s390/s390-64/utf8-utf16-z9.c b/sysdeps/s390/s390-64/utf8-utf16-z9.c
index 1425cb116a..4148ed796b 100644
--- a/sysdeps/s390/s390-64/utf8-utf16-z9.c
+++ b/sysdeps/s390/s390-64/utf8-utf16-z9.c
@@ -2,7 +2,7 @@
This module uses the Z9-109 variants of the Convert Unicode
instructions.
- Copyright (C) 1997-2015 Free Software Foundation, Inc.
+ Copyright (C) 1997-2016 Free Software Foundation, Inc.
Author: Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
Based on the work by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -145,22 +145,22 @@ gconv_end (struct __gconv_step *data)
directions. */
#define HARDWARE_CONVERT(INSTRUCTION) \
{ \
- register const unsigned char* pInput asm ("8") = inptr; \
- register unsigned long long inlen asm ("9") = inend - inptr; \
- register unsigned char* pOutput asm ("10") = outptr; \
- register unsigned long long outlen asm("11") = outend - outptr; \
+ register const unsigned char* pInput __asm__ ("8") = inptr; \
+ register unsigned long long inlen __asm__ ("9") = inend - inptr; \
+ register unsigned char* pOutput __asm__ ("10") = outptr; \
+ register unsigned long long outlen __asm__("11") = outend - outptr; \
uint64_t cc = 0; \
\
- 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), \
- "+d" (outlen), "+d" (inlen) \
- : \
- : "cc", "memory"); \
+ __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), \
+ "+d" (outlen), "+d" (inlen) \
+ : \
+ : "cc", "memory"); \
\
inptr = pInput; \
outptr = pOutput; \
@@ -183,6 +183,7 @@ gconv_end (struct __gconv_step *data)
#define MIN_NEEDED_INPUT MIN_NEEDED_FROM
#define MAX_NEEDED_INPUT MAX_NEEDED_FROM
#define MIN_NEEDED_OUTPUT MIN_NEEDED_TO
+#define MAX_NEEDED_OUTPUT MAX_NEEDED_TO
#define LOOPFCT FROM_LOOP
/* The software implementation is based on the code in gconv_simple.c. */
#define BODY \
@@ -340,6 +341,7 @@ gconv_end (struct __gconv_step *data)
/* Conversion from UTF-16 to UTF-8. */
#define MIN_NEEDED_INPUT MIN_NEEDED_TO
+#define MAX_NEEDED_INPUT MAX_NEEDED_TO
#define MIN_NEEDED_OUTPUT MIN_NEEDED_FROM
#define MAX_NEEDED_OUTPUT MAX_NEEDED_FROM
#define LOOPFCT TO_LOOP