From: Paolo Bonzini <pbonz...@redhat.com> v2 of the patch, now including strchr operations too and with the changes suggested by Bruno. Padraig, can you test it on your cases too?
Paolo Bonzini (5): unistr/u*-chr: prepare for multibyte tests unistr/u*-chr: test multibyte sequences unistr/u*-chr: test multibyte sequences more unistr/u*-strchr: add tests unistr/u8-chr, unistr/u8-strchr: use Boyer-Moore like algorithm. lib/unistr/u8-chr.c | 181 ++++++++++++++++++++++++++++----------- lib/unistr/u8-strchr.c | 136 ++++++++++++++++++++++++----- modules/unistr/u16-chr-tests | 1 + modules/unistr/u16-strchr-tests | 22 +++++ modules/unistr/u32-strchr-tests | 22 +++++ modules/unistr/u8-chr | 1 + modules/unistr/u8-chr-tests | 1 + modules/unistr/u8-strchr-tests | 22 +++++ tests/unistr/test-chr.h | 70 +++++++++++---- tests/unistr/test-strchr.h | 128 +++++++++++++++++++++++++++ tests/unistr/test-u16-chr.c | 2 + tests/unistr/test-u16-strchr.c | 33 +++++++ tests/unistr/test-u32-chr.c | 2 + tests/unistr/test-u32-strchr.c | 33 +++++++ tests/unistr/test-u8-chr.c | 2 + tests/unistr/test-u8-strchr.c | 33 +++++++ 16 files changed, 600 insertions(+), 89 deletions(-) create mode 100644 modules/unistr/u16-strchr-tests create mode 100644 modules/unistr/u32-strchr-tests create mode 100644 modules/unistr/u8-strchr-tests create mode 100644 tests/unistr/test-strchr.h create mode 100644 tests/unistr/test-u16-strchr.c create mode 100644 tests/unistr/test-u32-strchr.c create mode 100644 tests/unistr/test-u8-strchr.c