This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] fix BZ 18116 - build failure on ppc64le: setcontext.S uses power6 mtfsf when not supported
- From: Steven Munroe <munroesj at linux dot vnet dot ibm dot comcom>
- To: "Carlos O'Donell" <carlos at redhat dot com>
- Cc: munroesj at linux dot vnet dot ibm dot com, Martin Sebor <msebor at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 20 Mar 2015 08:34:51 -0500
- Subject: Re: [PATCH] fix BZ 18116 - build failure on ppc64le: setcontext.S uses power6 mtfsf when not supported
- Authentication-results: sourceware.org; auth=none
- References: <550715C8 dot 7020508 at redhat dot com> <1426538231 dot 13272 dot 28 dot camel at sjmunroe-ThinkPad-W500> <55074888 dot 5060408 at redhat dot com> <55076687 dot 7010903 at redhat dot com> <1426553899 dot 7010 dot 11 dot camel at oc8268013063 dot ibm dot com> <55079FC0 dot 3000806 at redhat dot com> <1426607756 dot 6715 dot 20 dot camel at sjmunroe-ThinkPad-W500> <55099A9B dot 2070600 at redhat dot com>
- Reply-to: munroesj at linux dot vnet dot ibm dot com
On Wed, 2015-03-18 at 11:32 -0400, Carlos O'Donell wrote:
> On 03/17/2015 11:55 AM, Steven Munroe wrote:
> > "Every thing should be a simple as possible, but no simpler."
> >
> > This is attributed to Albert Einstein, The original statement in German
> > is longer and more elegant and precise.
> >
> > Net, we want the simplest solutions that is correct given what the
> > PowerISA allows and the hardware implementations we are aware of.
>
> So just to clarify:
>
> * push/pop .machine pairs, and machine setting around instances of
> instructions that are predicated on a particular machine.
>
> * Minimizing the coverage of those push/pop .machine pairs allows
> for writing of code that supports multiple CPUs and may conditionally
> execute those instructions if it is detected that the CPU has
> the required features.
>
> * Continued use of #ifdef _ARCH_* conditionals to reduce the size
> of a functions code by removing code we know will never be executed
> given that we are not compiling with support for that ARCH.
>
> * Add additional HAVE_ASSEMBLER_* support macros to conditionalize
> instructions we can't actually assemble yet because we support
> wide range of assembler versions. The HAVE_ASSEMBLER_* macro is
> set by a configure check to see if we support assembling those
> particular instructions. This is common practice for x86 MPX and
> AVX512. This is not the case for mtfsf? All assemblers glibc
> supports building with can assemble the four operated form
> (binutils 2.22 or later)?
>
This is a good clarification. I wish I would thought of this ;)
The 4 operand form of mtfsf was added as part of the overall power6/DFP
enablement in 2006:
https://sourceware.org/ml/binutils/2006-10/msg00318.html
Since Binutils 2.22 is vintage 2011 I don't think we need
HAVE_ASSEMBLER_ for this case
Thanks