This patch reworks the s390 specific module to convert between utf8 and utf32. Now ifunc is used to choose either the c or etf3eh (with convert utf instruction) variants at runtime. Furthermore a new vector variant for z13 is introduced which will be build and chosen if vector support is available at build / runtime. The vector variants optimize input of 1byte utf8 characters. The convert utf instruction is used if a multibyte utf8 character is found.
This patch also fixes some whitespace errors. The c variants are rejecting UTF-16 surrogates and values above 0x10ffff now. Furthermore, the etf3eh variants are handling the "UTF-xx//IGNORE" case now. Before they ignored the ignore-case and always stopped at an error.
ChangeLog:
- sysdeps/s390/s390-64/utf8-utf32-z9.c: Use ifunc to select c, etf3eh or new vector loop-variant.
421c527 S390: Optimize utf8-utf32 module.
ChangeLog | 5 +
sysdeps/s390/s390-64/utf8-utf32-z9.c | 664 ++++++++++++++++++++++++----------
2 files changed, 485 insertions(+), 184 deletions(-)
Upstream: sourceware.org