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] fix BZ 18116 - build failure on ppc64le: setcontext.S uses power6 mtfsf when not supported


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



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