From 5ea1a82defd37feaa6be1faf44854364c901cdaf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 6 Jun 2000 06:49:00 +0000 Subject: Update. * iconvdata/big5hkscs.c: Add __builtin_expect in many places. * iconvdata/big5.c: Likewise. * iconvdata/ansi_x3.110.c: Likewise. * iconvdata/8bit-generic.c: Likewise. * iconvdata/8bit-gap.c: Likewise. * iconv/loop.c: Likewise. * iconv/gconv_db.c: Likewise. * iconv/gconv_dl.c: Likewise. * iconv/gconv_simple.c: Likewise. * iconv/skeleton.c: Likewise. --- iconvdata/8bit-gap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'iconvdata/8bit-gap.c') diff --git a/iconvdata/8bit-gap.c b/iconvdata/8bit-gap.c index c805d5e57c..75493f758f 100644 --- a/iconvdata/8bit-gap.c +++ b/iconvdata/8bit-gap.c @@ -48,7 +48,7 @@ struct gap { \ uint32_t ch = to_ucs4[*inptr]; \ \ - if (HAS_HOLES && ch == L'\0' && *inptr != '\0') \ + if (HAS_HOLES && __builtin_expect (ch, L'\1') == L'\0' && *inptr != '\0') \ { \ /* This is an illegal character. */ \ if (! ignore_errors_p ()) \ @@ -80,7 +80,7 @@ struct gap uint32_t ch = get32 (inptr); \ unsigned char res; \ \ - if (ch >= 0xffff) \ + if (__builtin_expect (ch, 0) >= 0xffff) \ { \ /* This is an illegal character. */ \ if (! ignore_errors_p ()) \ @@ -95,7 +95,7 @@ struct gap } \ while (ch > rp->end) \ ++rp; \ - if (ch < rp->start) \ + if (__builtin_expect (ch < rp->start, 0)) \ { \ /* This is an illegal character. */ \ if (! ignore_errors_p ()) \ @@ -110,7 +110,7 @@ struct gap } \ \ res = from_ucs4[ch + rp->idx]; \ - if (ch != 0 && res == '\0') \ + if (__builtin_expect (res, '\1') == '\0' && ch != 0) \ { \ /* This is an illegal character. */ \ if (! ignore_errors_p ()) \ -- cgit v1.2.3