From 535e935a284b2ec96659d1ac40eebf61321f2362 Mon Sep 17 00:00:00 2001 From: Noah Goldstein Date: Wed, 13 Apr 2022 19:46:03 -0500 Subject: Replace {u}int_fast{16|32} with {u}int32_t On 32-bit machines this has no affect. On 64-bit machines {u}int_fast{16|32} are set as {u}int64_t which is often not ideal. Particularly x86_64 this change both saves code size and may save instruction cost. Full xcheck passes on x86_64. --- iconvdata/cp932.c | 2 +- iconvdata/johab.c | 6 +++--- iconvdata/sjis.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'iconvdata') diff --git a/iconvdata/cp932.c b/iconvdata/cp932.c index 91487fa34c..f40f8e2a9d 100644 --- a/iconvdata/cp932.c +++ b/iconvdata/cp932.c @@ -4572,7 +4572,7 @@ static const char from_ucs4_extra[229][2] = /* Two-byte character. First test whether the next character \ is also available. */ \ uint32_t ch2; \ - uint_fast32_t idx; \ + uint32_t idx; \ \ if (__glibc_unlikely (inptr + 1 >= inend)) \ { \ diff --git a/iconvdata/johab.c b/iconvdata/johab.c index 33ec7b9a62..8dd5eba4a1 100644 --- a/iconvdata/johab.c +++ b/iconvdata/johab.c @@ -130,7 +130,7 @@ static const uint16_t jamo_from_ucs_table[51] = static uint32_t -johab_sym_hanja_to_ucs (uint_fast32_t idx, uint_fast32_t c1, uint_fast32_t c2) +johab_sym_hanja_to_ucs (uint32_t idx, uint32_t c1, uint32_t c2) { if (idx <= 0xdefe) return (uint32_t) __ksc5601_sym_to_ucs[(c1 - 0xd9) * 188 + c2 @@ -189,7 +189,7 @@ johab_sym_hanja_to_ucs (uint_fast32_t idx, uint_fast32_t c1, uint_fast32_t c2) /* Two-byte character. First test whether the next \ character is also available. */ \ uint32_t ch2; \ - uint_fast32_t idx; \ + uint32_t idx; \ \ if (__glibc_unlikely (inptr + 1 >= inend)) \ { \ @@ -204,7 +204,7 @@ johab_sym_hanja_to_ucs (uint_fast32_t idx, uint_fast32_t c1, uint_fast32_t c2) if (__glibc_likely (ch <= 0xd3)) \ { \ /* Hangul */ \ - int_fast32_t i, m, f; \ + int i, m, f; \ \ i = init[(idx & 0x7c00) >> 10]; \ m = mid[(idx & 0x03e0) >> 5]; \ diff --git a/iconvdata/sjis.c b/iconvdata/sjis.c index e1bdb3025c..5aea18b314 100644 --- a/iconvdata/sjis.c +++ b/iconvdata/sjis.c @@ -4359,7 +4359,7 @@ static const char from_ucs4_extra[0x100][2] = /* Two-byte character. First test whether the next byte \ is also available. */ \ uint32_t ch2; \ - uint_fast32_t idx; \ + uint32_t idx; \ \ if (__glibc_unlikely (inptr + 1 >= inend)) \ { \ -- cgit 1.4.1