Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 11 Jun 2017 18:45:00 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] s390x: Add single instruction math functions

* Rich Felker <dalias@...c.org> [2017-06-11 11:04:38 -0400]:
> On Sun, Jun 11, 2017 at 12:19:55PM +0200, Szabolcs Nagy wrote:
> > * Rich Felker <dalias@...c.org> [2017-06-10 22:20:44 -0400]:
> > > On Sat, Jun 10, 2017 at 05:48:05PM -0400, David Edelsohn wrote:
> > > > When I worked with Bobby Bingham to create the s390x port of Musl, I
> > > > said that he could assume newer processors.  Also, I don't believe
> > > > that LLVM supports the earlier processors.  I believe that he assumed
> > > > some more recent instructions in other parts of the code.
> > > 
> > > That seems doubtful; the amount of asm in musl is minimal and unlikely
> > > to benefit from later ISA levels; all the instructions I see look like
> > > very basic stuff that would always have been available.
> > > 
> > > Now, what likely is accurate is your claim that nobody is using musl
> > > on lower ISA levels, so maybe it doesn't matter.
> > 
> > well i am using s390x musl with lower isa level for compile tests
> > 
> > and it seems gas rejects unrecognized opcodes so the new inline
> > asm does not compile for me.
> > 
> > i think either musl configure should make sure the cc targets
> > the right isa level or the code should handle it with ifdefs
> 
> Do you know the right predefined macros to check the ISA level? David,
> any objection to including the #if/#ifdef since at least someone seems
> to want ability to build for minimum ISA level?
> 

i see no diff between

s390x-linux-musl-gcc -E -dM -

and

s390x-linux-musl-gcc -E -dM -march=z196 -

so it's not possible to tell at compile time, but the asm
is different so configure can detect it:

$ s390x-linux-musl-gcc -S -xc /dev/null -o -
	.machinemode zarch
	.machine "z900"
	.ident	"GCC: (GNU) 6.3.0"
	.section	.note.GNU-stack,"",@progbits
$ s390x-linux-musl-gcc -S -xc /dev/null -o - -march=z196
	.machinemode zarch
	.machine "z196"
	.ident	"GCC: (GNU) 6.3.0"
	.section	.note.GNU-stack,"",@progbits

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.