[PATCH] Add znver3 processor

H.J. Lu hjl.tools@gmail.com
Mon Oct 12 21:33:29 GMT 2020


On Mon, Oct 12, 2020 at 1:56 PM Gopalasubramanian, Ganesh
<Ganesh.Gopalasubramanian@amd.com> wrote:
>
> [AMD Public Use]
>
>
>
> <<Corrected the subject line>>
>
>
>
> Attached patch adds the following.
>
>         * New AMD znver3 processor (family 25). The architecture has the below features in addition to znver2 features
>
>                 * tlbsync, invlpgb, vaes, invpcid, snp, ospke, vpclmulqdq
>
>         * Details of the features and instructions are available in public document https://www.amd.com/system/files/TechDocs/24594.pdf.
>
> New test files are added.
>
>         1. arch-14.s: Lists out the new ISAs that are supported and checks it against the march option.
>
>         2. x86-64-arch-4.s: The 64-bit version of the test.
>
>         3. invlpgb.s: The test that checks the invlpgb instruction.
>
>         4. snp.s: The test that checks the SNP isa instructions.
>
>         5. tlbsync.s: The test that checks the tlbsync instruction.
>
>
>
> It passes make check on x86-64. Okay to commit?
>
>
>
> Changelog:
>
>
>
> 2020-10-13  Ganesh Gopalasubramanian  <Ganesh.Gopalasubramanian@amd.com>
>
>
>
> gas/
>
>
>
>         * config/tc-i386.c (cpu_arch): Add CPU_ZNVER3_FLAGS flags.
>
>         (i386_align_code): Add PROCESSOR_ZNVER cases.
>
>         * doc/c-i386.texi: Add znver3 and snp, invlpgb and tlbsync.
>
>
>
> gas/testsuite/
>
>         * gas/i386/i386.exp: Add new znver3 test cases.
>
>         * gas/i386/arch-14-znver3.d: New.
>
>         * gas/i386/arch-14.d: New.
>
>         * gas/i386/arch-14.s: New.
>
>         * gas/i386/invlpgb.d: New.
>
>         * gas/i386/invlpgb.s: New.
>
>         * gas/i386/snp.d: New.
>
>         * gas/i386/snp.s: New.
>
>         * gas/i386/tlbsync.d: New.
>
>         * gas/i386/tlbsync.s: New.
>
>         * gas/i386/x86-64-arch-4-znver3.d: New.
>
>         * gas/i386/x86-64-arch-4.d: New.
>
>         * gas/i386/x86-64-arch-4.s: New.
>
>
>
> opcodes/
>
>         * i386-dis.c (rm_table): Add tlbsync, snp, invlpgb.
>
>         * i386-gen.c (cpu_flag_init): Add new CPU_INVLPGB_FLAGS, CPU_TLBSYNC_FLAGS, and CPU_SNP_FLAGS.
>
>         Add CPU_ZNVER3_FLAGS.
>
>         (cpu_flags): Add CpuINVLPGB, CpuTLBSYNC, CpuSNP.
>
>         * i386-opc.h: Add CpuINVLPGB, CpuTLBSYNC, CpuSNP.
>
>         * i386-opc.tbl: Add invlpgb, tlbsync, SNP (psmash, pvalidate, rmpupdate, rmpadjust).
>
>         * i386-init.h: Re-generated.
>
>         * i386-tbl.h: Re-generated.
>

@@ -3096,12 +3098,32 @@ static const struct dis386 prefix_table[][4] = {
   {
     { Bad_Opcode },
     { "saveprevssp", { Skip_MODRM }, PREFIX_OPCODE },
+    { Bad_Opcode },
+    { Bad_Opcode },

Why do you need these?

   },

   /* PREFIX_0F01_REG_7_MOD_3_RM_2 */
   {
     { "monitorx", { { OP_Monitor, 0 } }, 0  },
     { "mcommit", { Skip_MODRM }, 0 },
+    { Bad_Opcode },
+    { Bad_Opcode },

Why do you need these?

+  },

Please send a proper patch generated by "git format-patch".
Please remove i386-init.h and i386-tbl.h from the git output.

-- 
H.J.


More information about the Binutils mailing list