[PATCH v2 2/2] Support Intel AMX-MOVRS

Jiang, Haochen haochen.jiang@intel.com
Tue Jan 7 03:10:52 GMT 2025


> From: Jiang, Haochen
> Sent: Monday, December 30, 2024 11:26 AM
> 
> >
> > > --- a/opcodes/i386-opc.tbl
> > > +++ b/opcodes/i386-opc.tbl
> > > @@ -3235,9 +3235,15 @@ tdpbhf8ps, 0xf2fd, AMX_FP8,
> > > Modrm|Vex128|Map5|Src2VVVV|VexW0|NoSuf, { RegTMM, Re
> > tdphbf8ps,
> > > 0xf3fd, AMX_FP8, Modrm|Vex128|Map5|Src2VVVV|VexW0|NoSuf,
> > { RegTMM,
> > > RegTMM, RegTMM }  tdphf8ps, 0x66fd, AMX_FP8,
> > > Modrm|Vex128|Map5|Src2VVVV|VexW0|NoSuf, { RegTMM, RegTMM,
> > RegTMM }
> > >
> > > +t2rpntlvw<z>rs<loc>, 0x<z:opc>f8 | <loc:opc>,
> > > +AMX_MOVRS&AMX_TRANSPOSE,
> > > +Sibmem|Vex128|Map5|VexW0|NoSuf|ImplicitGroup, {
> > > +Unspecified|BaseIndex, RegTMM } t2rpntlvw<z>rs<loc>, 0x<z:opc>f8 |
> > > +<loc:opc>, APX_F&AMX_MOVRS&AMX_TRANSPOSE,
> > > +Sibmem|EVex128|Map5|VexW0|NoSuf|ImplicitGroup, {
> > > +Unspecified|BaseIndex, RegTMM }
> > > +
> > >  <z>
> > >  <loc>
> >
> > Context-wise I'm afraid I can't associate this: It looks as if it went
> > on top of other than (just?) the AMX-TRANSPOSE patch you sent to the list.
> 
> Yes. We need AMX-TRANSPOSE patch first before this patch.

Ah... I misunderstood this part previously. After the complaint in AMX-AMV512,
I understood that here you are talking about AMX-FP8 related changes. I got your
point and saw the confusion here. I should have sent them in the same patch
series or just rebase them out.

> 
> >
> > I further wonder if APX_F() isn't usable even here, in a "non-standard" way:
> > Either of AMX_MOVRS&APX_F(AMX_TRANSPOSE) and
> > AMX_TRANSPOSE&APX_F(AMX_MOVRS) may work fine.
> >
> 
> It will need to change or ease the assert condition in cpu_flags_match:
> gas_assert (cpu_flags_equal (&cpu, &all)) to get the thing done like that.
> 
> Let me check if we could have another "equivalent" condition for that.
> 

At the end of the day, we could do something like:

          /* For some cpuid combinations, we do not need this assert check.  */
          if (!all.bitfield.cpuamx_transpose || !all.bitfield.cpuamx_movrs)
            gas_assert (cpu_flags_equal (&cpu, &all)); 

Do we have a better option other than that?

Thx,
Haochen


More information about the Binutils mailing list