[PATCH] Support Intel AMX-COMPLEX
Jiang, Haochen
haochen.jiang@intel.com
Tue Apr 4 08:41:01 GMT 2023
> On 03.04.2023 09:11, Haochen Jiang wrote:
> > @@ -1183,6 +1184,8 @@ if [gas_64_check] then {
> > run_dump_test "x86-64-avx-ne-convert-intel"
> > run_dump_test "x86-64-raoint"
> > run_dump_test "x86-64-raoint-intel"
> > + run_dump_test "x86-64-amx-complex"
> > + run_dump_test "x86-64-amx-complex-intel"
> > run_dump_test "x86-64-clzero"
> > run_dump_test "x86-64-mwaitx-bdver4"
> > run_list_test "x86-64-mwaitx-reg"
>
> There are constraints on operand combinations, like for tdp*, which want
> testing here as well (both the assembler and disassembler sides) imo.
I just saw those testcases, I will add them in v2 patch just like tdp* did.
Thx for the reminder.
>
> > @@ -4119,6 +4124,13 @@ static const struct dis386 prefix_table[][4] = {
> > { VEX_W_TABLE (VEX_W_0F385E_X86_64_P_3) },
> > },
> >
> > + /* PREFIX_VEX_0F386C_X86_64_W_0_M_1_L_0 */ {
> > + { "tcmmrlfp16ps", { TMM, EXtmm, VexTmm }, 0 },
> > + { Bad_Opcode },
> > + { "tcmmimfp16ps", { TMM, EXtmm, VexTmm }, 0 }, },
>
> You could avoid going through vex_w_table[] by making use of %XS here.
> (I guess I'll make a similar change for tdp*16ps, but - to avoid causing conflicts
> - perhaps only once yours went in.)
I will leave this to you, using %XS does eliminate W table pass.
>
> > --- a/opcodes/i386-opc.h
> > +++ b/opcodes/i386-opc.h
> > @@ -248,6 +248,8 @@ enum
> > CpuAMX_BF16,
> > /* AMX-FP16 instructions required */
> > CpuAMX_FP16,
> > + /* Intel AMX-COMPLEX Instructions support required. */
> > + CpuAMX_COMPLEX,
> > /* AMX-TILE instructions required */
> > CpuAMX_TILE,
> > /* GFNI instructions required */
>
> In line with adjacent comments, please omit "Intel" and "support" from the
> comment, and don't start "instructions" with a capital latter. Plus while the
> full stop is in line with general comment style, looking at adjacent comments
> here it probably also wants omitting.
Ok will do that in v2 patch.
>
> > --- a/opcodes/i386-opc.tbl
> > +++ b/opcodes/i386-opc.tbl
> > @@ -3163,6 +3163,13 @@ tilezero, 0xf249, AMX_TILE|x64,
> > Modrm|Vex128|Space0F38|VexW0|NoSuf, { RegTMM }
> >
> > // AMX instructions end.
> >
> > +// AMX-COMPLEX instructions.
> > +
> > +tcmmimfp16ps, 0x666c, AMX_COMPLEX|x64,
> > +Modrm|Vex128|Space0F38|VexVVVV|VexW0|SwapSources|NoSuf,
> { RegTMM,
> > +RegTMM, RegTMM } tcmmrlfp16ps, 0x6c, AMX_COMPLEX|x64,
> > +Modrm|Vex128|Space0F38|VexVVVV|VexW0|SwapSources|NoSuf,
> { RegTMM,
> > +RegTMM, RegTMM }
> > +
> > +// AMX-COMPLEX instructions end.
>
> I think these would better not have their own comment-bounded group, but
> go inside the "AMX instructions" sections (which already covers all AMX-*).
I will put them in alphabetical order in v2 patch, which means before tdp*.
Really appreciate your review and I will send v2 patch soon.
Haochen
>
> Jan
More information about the Binutils
mailing list