This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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] Update mtfsf and mtfsfi instructions to support new optional operands.


On Wed, 2009-01-21 at 15:58 -0600, Peter Bergner wrote:
> On Wed, 2009-01-21 at 22:45 +0100, Andreas Schwab wrote:
> > Peter Bergner <bergner@vnet.ibm.com> writes:
> > 
> > > @@ -4937,8 +4939,10 @@ const struct powerpc_opcode powerpc_opco
> > >  
> > >  {"dtstsfq",	X(63,674),	X_MASK,      POWER6,	PPCNONE,	{BF, FRA, FRB}},
> > >  
> > > -{"mtfsf",	XFL(63,711,0),	XFL_MASK,    COM,	PPCNONE,	{FLM, FRB, XFL_L, W}},
> > > -{"mtfsf.",	XFL(63,711,1),	XFL_MASK,    COM,	PPCNONE,	{FLM, FRB, XFL_L, W}},
> > > +{"mtfsf",	XFL(63,711,0),	XFL_MASK,    COM,	POWER6,		{FLM, FRB}},
> > > +{"mtfsf.",	XFL(63,711,1),	XFL_MASK,    COM,	POWER6,		{FLM, FRB}},
> > > +{"mtfsf",	XFL(63,711,0),	XFL_MASK,    POWER6,	PPCNONE,	{FLM, FRB, XFL_L, W}},
> > > +{"mtfsf.",	XFL(63,711,1),	XFL_MASK,    POWER6,	PPCNONE,	{FLM, FRB, XFL_L, W}},
> > 
> > This breaks building glibc.
> > 
> > ../sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S: Assembler messages:
> > ../sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S:381: Error: junk at end of line: `1,0'
> 
> This is probably a bug in glibc, using the new form of the instruction
> when they shouldn't be (ie, didn't configure with --with-cpu=power6).
> 
> Ryan / Steve,
> 
> Didn't one of you just add some code to guard the new mtfsf form?
> If so, has that gone upstream yet?
> 
> Peter

This is an interesting problem.

I needed to enable the new four operand mtfsf insn in GLIBC.  Drepper
said he wanted to see it implemented as a dynamic hw cap check for DFP
support (which is when this insn would be needed).

So the assembler needs to be able to understand the four operand version
even if we aren't compiling _explicitly_ for power6 because the code
needs to dynamically select the correct form of the insn.

Perhaps I can put .machine power6 in the asm file where this is used.


Ryan S. Arnold
IBM Linux Technology Center
Linux Toolchain Development


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