[PATCH V2] Support APX NF

Cui, Lili lili.cui@intel.com
Tue Mar 19 01:24:17 GMT 2024


> > >>>  // LZCNT instruction
> > >>>  lzcnt, 0xf30fbd, LZCNT, Modrm|CheckOperandSize|No_bSuf|No_sSuf,
> {
> > >>> Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 }
> > >>> +lzcnt, 0xf5, LZCNT|APX_F,
> > >>> +Modrm|CheckOperandSize|No_bSuf|No_sSuf|EVexMap4|NF, {
> > >>> +Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 }
> > >>
> > >> ... I think you mean LZCNT&APX_F here.
> > >>
> > >>>  // POPCNT instruction
> > >>>  popcnt, 0xf30fb8, POPCNT,
> > Modrm|CheckOperandSize|No_bSuf|No_sSuf,
> > >> {
> > >>> Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 }
> > >>> +popcnt, 0x88, POPCNT|APX_F,
> > >>> +Modrm|CheckOperandSize|No_bSuf|No_sSuf|EVexMap4|NF, {
> > >>> +Reg16|Reg32|Reg64|Unspecified|BaseIndex, Reg16|Reg32|Reg64 }
> > >>
> > >> Whereas here it ought to be just APX_F if the doc is to be trusted.
> > >
> > > I think they should be LZCNT&APX_F and POPCNT&APX_F, why do you
> > > think
> > POPCNT is special? I suspect I've missed something.
> >
> > Unless you're looking at a newer version of the APX spec than me,
> > you'll observe the difference when looking at the respective insn
> > pages: For LZCNT both CPUID bits are mentioned, while for POPCNT only
> > APX_F is there.
> >
> You are right. I will double confirm it with doc.
> 

The CPUID of POPCNT should be POPCNT and APX_F, and the APX spec should update it in the next release. Thanks.

Lili.


More information about the Binutils mailing list