mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 13:00:06 +00:00
4690dab084
This patch introduces a s390 specific 8bit-generic.c file which provides an optimized version for z13 with translate-/vector-instructions, which will be chosen at runtime via ifunc. If the build-environment lacks vector support, then iconvdata/8bit-generic.c is used wihtout any change. Otherwise iconvdata/8bit-generic.c is used to create conversion loop routines without vector instructions as fallback, if vector instructions aren't available at runtime. The vector routines can only be used with charsets where the maximum UCS4 value fits in 1 byte size. Then the hardware translate-instruction is used to translate between up to 256 generic characters and "1 byte UCS4" characters at once. The vector instructions are used to convert between the "1 byte UCS4" and UCS4. The gen-8bit.sh script in sysdeps/s390/multiarch generates the conversion table to_ucs1. Therefore in sysdeps/s390/multiarch/Makefile is added an override define generate-8bit-table, which is originally defined in iconvdata/Makefile. This version calls the gen-8bit.sh in iconvdata folder and the s390 one. ChangeLog: * sysdeps/s390/multiarch/8bit-generic.c: New File. * sysdeps/s390/multiarch/gen-8bit.sh: New File. * sysdeps/s390/multiarch/Makefile (generate-8bit-table): New override define. * sysdeps/s390/multiarch/iconv/skeleton.c: Likewise.
7 lines
205 B
Bash
7 lines
205 B
Bash
#!/bin/sh
|
|
echo "static const uint8_t to_ucs1[256] = {"
|
|
sed -ne '/^[^[:space:]]*[[:space:]]*.x00/d;/^END/q' \
|
|
-e 's/^<U00\(..\)>[[:space:]]*.x\(..\).*/ [0x\2] = 0x\1,/p' \
|
|
"$@" | sort -u
|
|
echo "};"
|