This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] S/390: UTF conversion modules - use .insn to avoid 'as'errors


On 04/02/2011 01:43 AM, Ulrich Drepper wrote:
> Just require a fixed binutils version.  It's a terrible idea to
> obfuscate code because of bugs which are already fixed.

The binutils fix I've mentioned makes AS to default to the highest available CPU. While
this would fix the standard case when building glibc without any specific -march= option
it would not help if somebody would build glibc with adding -march=z900 (which is lower
than z9-109) explicitely to the
CFLAGS. In that case -march=z900 would be passed to AS and AS would complain about the
z990 instructions being used in the iconv module, although that instruction would never be
in effect since a runtime check would prevent that. It is pretty much the same problem the
kernel guys are facing every now and then.

The patch proposal from Aurelien Jarno was to pass -march=z9-109 to AS only.  But this
would break if somebody would like to compile glibc optimized for a higher CPU like z10.
The AS -march=z9-109 option would override the -march=z10 passed through by GCC and AS
would complain about some z10 instruction being used.

On the other hand we cannot force this module to always be built with -march=z9-109 since
it also contains the software fallback conversion path which is intended for <z9-109 systems.

One way would be to pass -march=all to AS for this module. I've added this option just
some weeks ago:

http://sourceware.org/ml/binutils/2011-03/msg00355.html

But this would make glibc to depend on a very recent binutils version what is not
appropriate I think.

So for now I don't think there is a way around using .insn for these instructions.

-Andreas-


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]