assorted PPC questions

Peter Bergner bergner@linux.ibm.com
Wed Aug 5 19:29:19 GMT 2020


On 8/5/20 7:15 AM, Alan Modra wrote:
> On Wed, Aug 05, 2020 at 09:38:35AM +0200, Jan Beulich wrote:
>> Shouldn't objdump prefer pseudos of M{F,T}VSRD just like it does for
>> MFVSRWZ/MTVSRW{A,Z} (apparent anomaly introduced by c0637f3af6866)?
> 
> Yes, we should be consistent in choosing the fpr or vr extended
> mnemonics in all cases, I think.  Or in no case..

I agree we should be consistent.  Maybe while implementing that, I changed
my mind on what the preferred output should be and forgot to go back and
make them consistent???  I maybe prefer the mnemonic that uses VSR regnos,
but if someone else prefers fp/vr regnos, I'm fine with that too.



>> Shouldn't gas support Power7's (also Power8?) WAIT (with its WAITRSV
>> and WAITIMPL pseudos), currently supported for just E500MC and A2)?
> 
> Yes.

This whole "wait" mnemonic thing was a BIG mess!  IIRC, the wait mnemonic
showed up in the ISA docs, but wasn't actually implemented in some of the
server cpus that used those ISA levels.  I believe the code as is, reflects
what the cpus actually support.  However, I'd have to double check with
the hw designers to be sure.  I think if you look through the git logs,
you'll see me adding, removing and re-adding those mnemonics. :-(




>> Shouldn't gas reject (or at least warn about) instructions invalid
>> in little endian mode?
> 
> lmw, stmw, lswi, lswx, stswi, stswx?  Probably.

I'm guessing I must have implemented these and missed the endian restriction.
If they're really not valid in LE mode, then I think we should emit an error.



>> Furthermore there are a few items which look to be inconsistent /
>> incomplete in the ISA spec itself, and hence aren't directly gas
>> issues:
>>
>> While there are XVMOV{S,D}P pseudos of XVCPSGN{S,D}P, shouldn't
>> there also be XSMOV{D,Q}P (based on XSCPSGN{D,Q}P)? (I'm somewhat
>> puzzled by the absence of XSCPSGNSP, but the set of XS*SP looks to
>> be rather more limited compared to XS*DP and even XS*QP anyway.)
>>
>> Wouldn't there better be CCTP* (as used by Cell) or similar pseudos
>> of OR?
>>
>> Wouldn't availability of pseudos implying %cr0 as first (i.e.
>> destination) operand better be consistent throughout the opcode set?
> 
> I'm going to leave answering these last points to Peter, or until
> tomorrow after I implement the ones that are in the ISA and missing
> from gas.  Thanks!

If I missed some mnemonics and they're in the ISA, I totally agree we
should add them.  We implement these things long before there is an ISA
doc and with multiple updates to the different RFCs that go into the new
ISA version, it's easy to miss something being added/removed.

Peter



More information about the Binutils mailing list