S390: Optimize utf16-utf32 module.
authorStefan Liebler <stli@linux.vnet.ibm.com>
Wed, 25 May 2016 15:18:05 +0000 (17:18 +0200)
committerStefan Liebler <stli@linux.vnet.ibm.com>
Wed, 25 May 2016 15:18:05 +0000 (17:18 +0200)
commit6896776c3c9c32fd22324e6de6737dd69ae73213
tree4ec4ff652045977f09d063838faa58a2fd0c5ac8
parent5bd11b19099b3f22d821515f9c93f1ecc1a7e15e
S390: Optimize utf16-utf32 module.

This patch reworks the s390 specific module to convert between utf16 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.

In case of converting utf 32 to utf16, the vector variant optimizes input of
2byte utf16 characters. The convert utf instruction is used if an utf16
surrogate is found.

For the other direction utf16 to utf32, the cu24 instruction can't be re-
enabled, because it does not report an error, if the input-stream consists of
a single low surrogate utf16 char (e.g. 0xdc00). This applies to the newest z13,
too. Thus there is only the c or the new vector variant, which can handle utf16
surrogate characters.

This patch also fixes some whitespace errors. Furthermore, the etf3eh variant is
handling the "UTF-xx//IGNORE" case now. Before they ignored the ignore-case and
always stopped at an error.

ChangeLog:

* sysdeps/s390/s390-64/utf16-utf32-z9.c: Use ifunc to select c,
etf3eh or new vector loop-variant.
ChangeLog
sysdeps/s390/s390-64/utf16-utf32-z9.c