diff options
Diffstat (limited to 'sysdeps/s390/s390-64/utf8-utf16-z9.c')
-rw-r--r-- | sysdeps/s390/s390-64/utf8-utf16-z9.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sysdeps/s390/s390-64/utf8-utf16-z9.c b/sysdeps/s390/s390-64/utf8-utf16-z9.c index 863677455c..74754211c1 100644 --- a/sysdeps/s390/s390-64/utf8-utf16-z9.c +++ b/sysdeps/s390/s390-64/utf8-utf16-z9.c @@ -50,7 +50,7 @@ && data->__invocation_counter == 0) \ { \ /* Emit the UTF-16 Byte Order Mark. */ \ - if (__builtin_expect (outbuf + 2 > outend, 0)) \ + if (__glibc_unlikely (outbuf + 2 > outend)) \ return __GCONV_FULL_OUTPUT; \ \ put16u (outbuf, BOM_UTF16); \ @@ -197,7 +197,7 @@ gconv_end (struct __gconv_step *data) if ((inptr[i] & 0xc0) != 0x80) \ break; \ \ - if (__builtin_expect (inptr + i == inend, 1)) \ + if (__glibc_likely (inptr + i == inend)) \ { \ result = __GCONV_INCOMPLETE_INPUT; \ break; \ @@ -210,7 +210,7 @@ gconv_end (struct __gconv_step *data) /* Next input byte. */ \ uint16_t ch = *inptr; \ \ - if (__builtin_expect (ch < 0x80, 1)) \ + if (__glibc_likely (ch < 0x80)) \ { \ /* One byte sequence. */ \ ++inptr; \ @@ -228,13 +228,13 @@ gconv_end (struct __gconv_step *data) cnt = 2; \ ch &= 0x1f; \ } \ - else if (__builtin_expect ((ch & 0xf0) == 0xe0, 1)) \ + else if (__glibc_likely ((ch & 0xf0) == 0xe0)) \ { \ /* We expect three bytes. */ \ cnt = 3; \ ch &= 0x0f; \ } \ - else if (__builtin_expect ((ch & 0xf8) == 0xf0, 1)) \ + else if (__glibc_likely ((ch & 0xf8) == 0xf0)) \ { \ /* We expect four bytes. */ \ cnt = 4; \ @@ -255,7 +255,7 @@ gconv_end (struct __gconv_step *data) STANDARD_FROM_LOOP_ERR_HANDLER (i); \ } \ \ - if (__builtin_expect (inptr + cnt > inend, 0)) \ + if (__glibc_unlikely (inptr + cnt > inend)) \ { \ /* We don't have enough input. But before we report \ that check that all the bytes are correct. */ \ @@ -263,7 +263,7 @@ gconv_end (struct __gconv_step *data) if ((inptr[i] & 0xc0) != 0x80) \ break; \ \ - if (__builtin_expect (inptr + i == inend, 1)) \ + if (__glibc_likely (inptr + i == inend)) \ { \ result = __GCONV_INCOMPLETE_INPUT; \ break; \ @@ -278,7 +278,7 @@ gconv_end (struct __gconv_step *data) low) are needed. */ \ uint16_t zabcd, high, low; \ \ - if (__builtin_expect (outptr + 4 > outend, 0)) \ + if (__glibc_unlikely (outptr + 4 > outend)) \ { \ /* Overflow in the output buffer. */ \ result = __GCONV_FULL_OUTPUT; \ @@ -368,7 +368,7 @@ gconv_end (struct __gconv_step *data) \ uint16_t c = get16 (inptr); \ \ - if (__builtin_expect (c <= 0x007f, 1)) \ + if (__glibc_likely (c <= 0x007f)) \ { \ /* Single byte UTF-8 char. */ \ *outptr = c & 0xff; \ @@ -378,7 +378,7 @@ gconv_end (struct __gconv_step *data) { \ /* Two byte UTF-8 char. */ \ \ - if (__builtin_expect (outptr + 2 > outend, 0)) \ + if (__glibc_unlikely (outptr + 2 > outend)) \ { \ /* Overflow in the output buffer. */ \ result = __GCONV_FULL_OUTPUT; \ @@ -397,7 +397,7 @@ gconv_end (struct __gconv_step *data) { \ /* Three byte UTF-8 char. */ \ \ - if (__builtin_expect (outptr + 3 > outend, 0)) \ + if (__glibc_unlikely (outptr + 3 > outend)) \ { \ /* Overflow in the output buffer. */ \ result = __GCONV_FULL_OUTPUT; \ @@ -419,14 +419,14 @@ gconv_end (struct __gconv_step *data) /* Four byte UTF-8 char. */ \ uint16_t low, uvwxy; \ \ - if (__builtin_expect (outptr + 4 > outend, 0)) \ + if (__glibc_unlikely (outptr + 4 > outend)) \ { \ /* Overflow in the output buffer. */ \ result = __GCONV_FULL_OUTPUT; \ break; \ } \ inptr += 2; \ - if (__builtin_expect (inptr + 2 > inend, 0)) \ + if (__glibc_unlikely (inptr + 2 > inend)) \ { \ result = __GCONV_INCOMPLETE_INPUT; \ break; \ |