[PATCH] S/390: HW accelerated iconv module for iso-8859-1/cp37 conversions

Andreas Krebbel krebbel@linux.vnet.ibm.com
Mon Mar 16 12:47:00 GMT 2009


> You should be able to just have an iso8859-1.c file in a s390-specific
> directory.  You don't need to original module and therefore there is no
> need for the original module.

The S/390 instruction is only able to deal with 8 bit conversion tables. 
Therefore I don't think it will be possible to cover the UCS4 conversion 
provided by the original module.

> If there is an issue with using the module on machines which don't have
> this instruction then we can slightly extend the loop.c implementation.
>  Add a second BODY definition (BODY2) and a new macro BODY_SELECT or so
> to select which of the two to select.  Then in loop.c, if BODY_SELECT is
> defined, replicate the while loop around BODY for BODY2.

Ok. I'll try to implement this for the more sophisticated translate 
instructions introduced with recent machines. Thanks.

> Also, isn't ISO 8859-1 outdated?  Almost nobody in Europe can use it
> because of the missing € sign.  You should rather support ISO 8859-15 etc.

Yes that's right. I'll add support for other variants. I think it would 
make sense to generate a variety of 8 bit conversion tables at build 
time using an already installed iconv tool (or perhaps using a script 
which uses the localedata/charmaps files). That way it would be possible 
to support a wide range of single byte conversions with a small amount 
of extra code.  Does that sound reasonable to you?

Bye,

-Andreas-



More information about the Libc-alpha mailing list