all: add GFNI instructions (#344)

Adds support for the GFNI "Galois Field New Instructions" instruction set.

These instructions are not included in the Opcodes database, therefore they're
added using the "extras" mechanism introduced in #345.

For simplicity, the loading phase is updated slightly so that AVX-512 form
expansion rules are applied after extras are added to the list. This greatly
reduces the number of forms that have to be specified by hand.

Based on #343
Fixes #335

Co-authored-by: Klaus Post <klauspost@gmail.com>
This commit is contained in:
Michael McLoughlin
2022-11-27 18:53:46 -08:00
committed by GitHub
parent a0ea0f3e6f
commit 946323570a
10 changed files with 2362 additions and 398 deletions

View File

@@ -2085,6 +2085,16 @@ func TestContextInstructions(t *testing.T) {
ctx.VGETMANTSS_SAE(opimm8, opxmm, opxmm, opk, opxmm)
ctx.VGETMANTSS_SAE_Z(opimm8, opxmm, opxmm, opk, opxmm)
ctx.VGETMANTSS_Z(opimm8, opm32, opxmm, opk, opxmm)
ctx.VGF2P8AFFINEINVQB(opimm8, opm128, opxmm, opxmm)
ctx.VGF2P8AFFINEINVQB_BCST(opimm8, opm64, opzmm, opk, opzmm)
ctx.VGF2P8AFFINEINVQB_BCST_Z(opimm8, opm64, opzmm, opk, opzmm)
ctx.VGF2P8AFFINEINVQB_Z(opimm8, opm512, opzmm, opk, opzmm)
ctx.VGF2P8AFFINEQB(opimm8, opm128, opxmm, opxmm)
ctx.VGF2P8AFFINEQB_BCST(opimm8, opm64, opzmm, opk, opzmm)
ctx.VGF2P8AFFINEQB_BCST_Z(opimm8, opm64, opzmm, opk, opzmm)
ctx.VGF2P8AFFINEQB_Z(opimm8, opm512, opzmm, opk, opzmm)
ctx.VGF2P8MULB(opm128, opxmm, opxmm)
ctx.VGF2P8MULB_Z(opm512, opzmm, opk, opzmm)
ctx.VHADDPD(opm128, opxmm, opxmm)
ctx.VHADDPS(opm128, opxmm, opxmm)
ctx.VHSUBPD(opm128, opxmm, opxmm)