|
Message-ID: <20170614233402.GH1627@brightrain.aerifal.cx> Date: Wed, 14 Jun 2017 19:34:02 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: [PATCH] s390x: Add single instruction math functions On Tue, Jun 13, 2017 at 05:55:13PM +0200, Szabolcs Nagy wrote: > > > diff --git a/configure b/configure > > > index c2db298c..bcaf3a7d 100755 > > > --- a/configure > > > +++ b/configure > > > @@ -656,6 +656,12 @@ trycppif __LITTLE_ENDIAN__ "$t" && SUBARCH=${SUBARCH}le > > > trycppif _SOFT_FLOAT "$t" && fail "$0: error: soft-float not supported on powerpc64" > > > fi > > > > > > +if test "$ARCH" = "s390x" ; then > > > +echo 'float x; void f(){__asm__("fiebra %0,6,%1,4":"=f"(x):"f"(x));}' > "$tmpc" > > > +$CC $CFLAGS_C99FSE $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" >/dev/null 2>&1 || > > > + fail "$0: error: s390x isa level is too low, use at least -march=z196" > > > +fi > > > + > > > if test "$ARCH" = "sh" ; then > > > tryflag CFLAGS_AUTO -Wa,--isa=any > > > trycppif __BIG_ENDIAN__ "$t" && SUBARCH=${SUBARCH}eb > > > > Why is the x86 configure logic that I used as a template correct? > > hm i didnt know about that > then the patch is probably ok. The x86 logic is actually implementing policy to the opposite effect, ignoring the toolchain's default -march and forcing the minimum baseline isa (i486) unless the user manually puts a specific -march in CFLAGS. I'm doubtful that it's actually a good idea to be doing that any more; at least it's inconsistent with how other archs are treated (using the toolchain's default). Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.