diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-06-06 06:49:00 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-06-06 06:49:00 +0000 |
commit | 5ea1a82defd37feaa6be1faf44854364c901cdaf (patch) | |
tree | 9fad50dfb181485bb4ca62c9d96e0d31376dce07 /iconvdata/big5.c | |
parent | 365afefc6b7054d9ca7585f6f17bdd1fe03b8cfd (diff) | |
download | glibc-5ea1a82defd37feaa6be1faf44854364c901cdaf.tar.gz |
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.
Diffstat (limited to 'iconvdata/big5.c')
-rw-r--r-- | iconvdata/big5.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/iconvdata/big5.c b/iconvdata/big5.c index 0e4ca7464a..363b2506d6 100644 --- a/iconvdata/big5.c +++ b/iconvdata/big5.c @@ -8450,7 +8450,8 @@ static const char from_ucs4_tab13[][2] = /* See whether the second byte is in the correct range. */ \ if (ch2 >= 0x40 && ch2 <= 0x7e) \ idx += ch2 - 0x40; \ - else if (ch2 >= 0xa1 && ch2 <= 0xfe) \ + else if (__builtin_expect (ch2, 0xa1) >= 0xa1 \ + && __builtin_expect (ch2, 0xa1) <= 0xfe) \ idx += 0x3f + (ch2 - 0xa1); \ else \ { \ @@ -8470,7 +8471,7 @@ static const char from_ucs4_tab13[][2] = ch = big5_to_ucs[idx]; \ \ /* Is this character defined? */ \ - if (ch == 0 && *inptr != '\0') \ + if (__builtin_expect (ch, 1) == 0 && *inptr != '\0') \ { \ /* This is an illegal character. */ \ if (! ignore_errors_p ()) \ @@ -8506,7 +8507,8 @@ static const char from_ucs4_tab13[][2] = char buf[2]; \ const char *cp; \ \ - if (ch >= sizeof (from_ucs4_tab1) / sizeof (from_ucs4_tab1[0])) \ + if (__builtin_expect (ch, 0) \ + >= sizeof (from_ucs4_tab1) / sizeof (from_ucs4_tab1[0])) \ switch (ch) \ { \ case 0x2c7 ... 0x2d9: \ @@ -8578,7 +8580,7 @@ static const char from_ucs4_tab13[][2] = else \ cp = from_ucs4_tab1[ch]; \ \ - if (cp[0] == '\0' && ch != 0) \ + if (__builtin_expect (cp[0], '\1') == '\0' && ch != 0) \ { \ /* Illegal character. */ \ if (! ignore_errors_p ()) \ @@ -8592,7 +8594,8 @@ static const char from_ucs4_tab13[][2] = else \ { \ /* See whether there is enough room for the second byte we write. */ \ - if (NEED_LENGTH_TEST && cp[1] != '\0' && outptr + 1 >= outend) \ + if (NEED_LENGTH_TEST && __builtin_expect (cp[1], '\1') != '\0' \ + && __builtin_expect (outptr + 1 >= outend, 0)) \ { \ /* We have not enough room. */ \ result = __GCONV_FULL_OUTPUT; \ |