all: BITALG instructions (#362)

Adds the AVX-512 Bit Algorithms instruction set.

These new instructions are added via the `opcodesextra` mechanism #345, since
they're missing from the opcodes database.

Contributed by @vsivsi. Extracted from #234 with simplifications for AVX-512
form expansion.

Co-authored-by: Vaughn Iverson <vsivsi@yahoo.com>
This commit is contained in:
Michael McLoughlin
2023-01-10 18:55:12 -08:00
committed by GitHub
parent a42c8ae281
commit 05ed388d0f
8 changed files with 1308 additions and 159 deletions

View File

@@ -91515,6 +91515,174 @@ var Instructions = []Instruction{
},
},
},
{
Opcode: "VPOPCNTB",
Summary: "Packed Population Count for Byte Integers",
Forms: []Form{
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "m128", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "xmm", Action: 0x3},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "m128", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "xmm", Action: 0x2},
},
EncodingType: 0x4,
Zeroing: true,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "m128", Action: 0x1},
{Type: "xmm", Action: 0x2},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "m256", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "ymm", Action: 0x3},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "m256", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "ymm", Action: 0x2},
},
EncodingType: 0x4,
Zeroing: true,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "m256", Action: 0x1},
{Type: "ymm", Action: 0x2},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "xmm", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "xmm", Action: 0x3},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "xmm", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "xmm", Action: 0x2},
},
EncodingType: 0x4,
Zeroing: true,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "xmm", Action: 0x1},
{Type: "xmm", Action: 0x2},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "ymm", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "ymm", Action: 0x3},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "ymm", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "ymm", Action: 0x2},
},
EncodingType: 0x4,
Zeroing: true,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "ymm", Action: 0x1},
{Type: "ymm", Action: 0x2},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG"},
Operands: []Operand{
{Type: "m512", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "zmm", Action: 0x3},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG"},
Operands: []Operand{
{Type: "m512", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "zmm", Action: 0x2},
},
EncodingType: 0x4,
Zeroing: true,
},
{
ISA: []string{"AVX512BITALG"},
Operands: []Operand{
{Type: "m512", Action: 0x1},
{Type: "zmm", Action: 0x2},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG"},
Operands: []Operand{
{Type: "zmm", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "zmm", Action: 0x3},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG"},
Operands: []Operand{
{Type: "zmm", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "zmm", Action: 0x2},
},
EncodingType: 0x4,
Zeroing: true,
},
{
ISA: []string{"AVX512BITALG"},
Operands: []Operand{
{Type: "zmm", Action: 0x1},
{Type: "zmm", Action: 0x2},
},
EncodingType: 0x4,
},
},
},
{
Opcode: "VPOPCNTD",
Summary: "Packed Population Count for Doubleword Integers",
@@ -92031,6 +92199,174 @@ var Instructions = []Instruction{
},
},
},
{
Opcode: "VPOPCNTW",
Summary: "Packed Population Count for Word Integers",
Forms: []Form{
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "m128", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "xmm", Action: 0x3},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "m128", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "xmm", Action: 0x2},
},
EncodingType: 0x4,
Zeroing: true,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "m128", Action: 0x1},
{Type: "xmm", Action: 0x2},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "m256", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "ymm", Action: 0x3},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "m256", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "ymm", Action: 0x2},
},
EncodingType: 0x4,
Zeroing: true,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "m256", Action: 0x1},
{Type: "ymm", Action: 0x2},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "xmm", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "xmm", Action: 0x3},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "xmm", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "xmm", Action: 0x2},
},
EncodingType: 0x4,
Zeroing: true,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "xmm", Action: 0x1},
{Type: "xmm", Action: 0x2},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "ymm", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "ymm", Action: 0x3},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "ymm", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "ymm", Action: 0x2},
},
EncodingType: 0x4,
Zeroing: true,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "ymm", Action: 0x1},
{Type: "ymm", Action: 0x2},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG"},
Operands: []Operand{
{Type: "m512", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "zmm", Action: 0x3},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG"},
Operands: []Operand{
{Type: "m512", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "zmm", Action: 0x2},
},
EncodingType: 0x4,
Zeroing: true,
},
{
ISA: []string{"AVX512BITALG"},
Operands: []Operand{
{Type: "m512", Action: 0x1},
{Type: "zmm", Action: 0x2},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG"},
Operands: []Operand{
{Type: "zmm", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "zmm", Action: 0x3},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG"},
Operands: []Operand{
{Type: "zmm", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "zmm", Action: 0x2},
},
EncodingType: 0x4,
Zeroing: true,
},
{
ISA: []string{"AVX512BITALG"},
Operands: []Operand{
{Type: "zmm", Action: 0x1},
{Type: "zmm", Action: 0x2},
},
EncodingType: 0x4,
},
},
},
{
Opcode: "VPOR",
Summary: "Packed Bitwise Logical OR",
@@ -95304,6 +95640,126 @@ var Instructions = []Instruction{
},
},
},
{
Opcode: "VPSHUFBITQMB",
Summary: "Shuffle Bits from Quadword Elements Using Byte Indexes into Mask",
Forms: []Form{
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "m128", Action: 0x1},
{Type: "xmm", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "k", Action: 0x2},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "m128", Action: 0x1},
{Type: "xmm", Action: 0x1},
{Type: "k", Action: 0x2},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "m256", Action: 0x1},
{Type: "ymm", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "k", Action: 0x2},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "m256", Action: 0x1},
{Type: "ymm", Action: 0x1},
{Type: "k", Action: 0x2},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "xmm", Action: 0x1},
{Type: "xmm", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "k", Action: 0x2},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "xmm", Action: 0x1},
{Type: "xmm", Action: 0x1},
{Type: "k", Action: 0x2},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "ymm", Action: 0x1},
{Type: "ymm", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "k", Action: 0x2},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "ymm", Action: 0x1},
{Type: "ymm", Action: 0x1},
{Type: "k", Action: 0x2},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "zmm", Action: 0x1},
{Type: "zmm", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "k", Action: 0x2},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG", "AVX512VL"},
Operands: []Operand{
{Type: "zmm", Action: 0x1},
{Type: "zmm", Action: 0x1},
{Type: "k", Action: 0x2},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG"},
Operands: []Operand{
{Type: "m512", Action: 0x1},
{Type: "zmm", Action: 0x1},
{Type: "k", Action: 0x1},
{Type: "k", Action: 0x2},
},
EncodingType: 0x4,
},
{
ISA: []string{"AVX512BITALG"},
Operands: []Operand{
{Type: "m512", Action: 0x1},
{Type: "zmm", Action: 0x1},
{Type: "k", Action: 0x2},
},
EncodingType: 0x4,
},
},
},
{
Opcode: "VPSHUFD",
Summary: "Shuffle Packed Doublewords",