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

@@ -69244,6 +69244,80 @@ func (c *Context) VPMULUDQ_Z(mxyz, xyz, k, xyz1 operand.Op) {
// Operates on the global context.
func VPMULUDQ_Z(mxyz, xyz, k, xyz1 operand.Op) { ctx.VPMULUDQ_Z(mxyz, xyz, k, xyz1) }
// VPOPCNTB: Packed Population Count for Byte Integers.
//
// Forms:
//
// VPOPCNTB m128 k xmm
// VPOPCNTB m128 xmm
// VPOPCNTB m256 k ymm
// VPOPCNTB m256 ymm
// VPOPCNTB xmm k xmm
// VPOPCNTB xmm xmm
// VPOPCNTB ymm k ymm
// VPOPCNTB ymm ymm
// VPOPCNTB m512 k zmm
// VPOPCNTB m512 zmm
// VPOPCNTB zmm k zmm
// VPOPCNTB zmm zmm
//
// Construct and append a VPOPCNTB instruction to the active function.
func (c *Context) VPOPCNTB(ops ...operand.Op) {
c.addinstruction(x86.VPOPCNTB(ops...))
}
// VPOPCNTB: Packed Population Count for Byte Integers.
//
// Forms:
//
// VPOPCNTB m128 k xmm
// VPOPCNTB m128 xmm
// VPOPCNTB m256 k ymm
// VPOPCNTB m256 ymm
// VPOPCNTB xmm k xmm
// VPOPCNTB xmm xmm
// VPOPCNTB ymm k ymm
// VPOPCNTB ymm ymm
// VPOPCNTB m512 k zmm
// VPOPCNTB m512 zmm
// VPOPCNTB zmm k zmm
// VPOPCNTB zmm zmm
//
// Construct and append a VPOPCNTB instruction to the active function.
// Operates on the global context.
func VPOPCNTB(ops ...operand.Op) { ctx.VPOPCNTB(ops...) }
// VPOPCNTB_Z: Packed Population Count for Byte Integers (Zeroing Masking).
//
// Forms:
//
// VPOPCNTB.Z m128 k xmm
// VPOPCNTB.Z m256 k ymm
// VPOPCNTB.Z xmm k xmm
// VPOPCNTB.Z ymm k ymm
// VPOPCNTB.Z m512 k zmm
// VPOPCNTB.Z zmm k zmm
//
// Construct and append a VPOPCNTB.Z instruction to the active function.
func (c *Context) VPOPCNTB_Z(mxyz, k, xyz operand.Op) {
c.addinstruction(x86.VPOPCNTB_Z(mxyz, k, xyz))
}
// VPOPCNTB_Z: Packed Population Count for Byte Integers (Zeroing Masking).
//
// Forms:
//
// VPOPCNTB.Z m128 k xmm
// VPOPCNTB.Z m256 k ymm
// VPOPCNTB.Z xmm k xmm
// VPOPCNTB.Z ymm k ymm
// VPOPCNTB.Z m512 k zmm
// VPOPCNTB.Z zmm k zmm
//
// Construct and append a VPOPCNTB.Z instruction to the active function.
// Operates on the global context.
func VPOPCNTB_Z(mxyz, k, xyz operand.Op) { ctx.VPOPCNTB_Z(mxyz, k, xyz) }
// VPOPCNTD: Packed Population Count for Doubleword Integers.
//
// Forms:
@@ -69504,6 +69578,80 @@ func (c *Context) VPOPCNTQ_Z(mxyz, k, xyz operand.Op) {
// Operates on the global context.
func VPOPCNTQ_Z(mxyz, k, xyz operand.Op) { ctx.VPOPCNTQ_Z(mxyz, k, xyz) }
// VPOPCNTW: Packed Population Count for Word Integers.
//
// Forms:
//
// VPOPCNTW m128 k xmm
// VPOPCNTW m128 xmm
// VPOPCNTW m256 k ymm
// VPOPCNTW m256 ymm
// VPOPCNTW xmm k xmm
// VPOPCNTW xmm xmm
// VPOPCNTW ymm k ymm
// VPOPCNTW ymm ymm
// VPOPCNTW m512 k zmm
// VPOPCNTW m512 zmm
// VPOPCNTW zmm k zmm
// VPOPCNTW zmm zmm
//
// Construct and append a VPOPCNTW instruction to the active function.
func (c *Context) VPOPCNTW(ops ...operand.Op) {
c.addinstruction(x86.VPOPCNTW(ops...))
}
// VPOPCNTW: Packed Population Count for Word Integers.
//
// Forms:
//
// VPOPCNTW m128 k xmm
// VPOPCNTW m128 xmm
// VPOPCNTW m256 k ymm
// VPOPCNTW m256 ymm
// VPOPCNTW xmm k xmm
// VPOPCNTW xmm xmm
// VPOPCNTW ymm k ymm
// VPOPCNTW ymm ymm
// VPOPCNTW m512 k zmm
// VPOPCNTW m512 zmm
// VPOPCNTW zmm k zmm
// VPOPCNTW zmm zmm
//
// Construct and append a VPOPCNTW instruction to the active function.
// Operates on the global context.
func VPOPCNTW(ops ...operand.Op) { ctx.VPOPCNTW(ops...) }
// VPOPCNTW_Z: Packed Population Count for Word Integers (Zeroing Masking).
//
// Forms:
//
// VPOPCNTW.Z m128 k xmm
// VPOPCNTW.Z m256 k ymm
// VPOPCNTW.Z xmm k xmm
// VPOPCNTW.Z ymm k ymm
// VPOPCNTW.Z m512 k zmm
// VPOPCNTW.Z zmm k zmm
//
// Construct and append a VPOPCNTW.Z instruction to the active function.
func (c *Context) VPOPCNTW_Z(mxyz, k, xyz operand.Op) {
c.addinstruction(x86.VPOPCNTW_Z(mxyz, k, xyz))
}
// VPOPCNTW_Z: Packed Population Count for Word Integers (Zeroing Masking).
//
// Forms:
//
// VPOPCNTW.Z m128 k xmm
// VPOPCNTW.Z m256 k ymm
// VPOPCNTW.Z xmm k xmm
// VPOPCNTW.Z ymm k ymm
// VPOPCNTW.Z m512 k zmm
// VPOPCNTW.Z zmm k zmm
//
// Construct and append a VPOPCNTW.Z instruction to the active function.
// Operates on the global context.
func VPOPCNTW_Z(mxyz, k, xyz operand.Op) { ctx.VPOPCNTW_Z(mxyz, k, xyz) }
// VPOR: Packed Bitwise Logical OR.
//
// Forms:
@@ -71005,6 +71153,49 @@ func (c *Context) VPSHUFB(ops ...operand.Op) {
// Operates on the global context.
func VPSHUFB(ops ...operand.Op) { ctx.VPSHUFB(ops...) }
// VPSHUFBITQMB: Shuffle Bits from Quadword Elements Using Byte Indexes into Mask.
//
// Forms:
//
// VPSHUFBITQMB m128 xmm k k
// VPSHUFBITQMB m128 xmm k
// VPSHUFBITQMB m256 ymm k k
// VPSHUFBITQMB m256 ymm k
// VPSHUFBITQMB xmm xmm k k
// VPSHUFBITQMB xmm xmm k
// VPSHUFBITQMB ymm ymm k k
// VPSHUFBITQMB ymm ymm k
// VPSHUFBITQMB zmm zmm k k
// VPSHUFBITQMB zmm zmm k
// VPSHUFBITQMB m512 zmm k k
// VPSHUFBITQMB m512 zmm k
//
// Construct and append a VPSHUFBITQMB instruction to the active function.
func (c *Context) VPSHUFBITQMB(ops ...operand.Op) {
c.addinstruction(x86.VPSHUFBITQMB(ops...))
}
// VPSHUFBITQMB: Shuffle Bits from Quadword Elements Using Byte Indexes into Mask.
//
// Forms:
//
// VPSHUFBITQMB m128 xmm k k
// VPSHUFBITQMB m128 xmm k
// VPSHUFBITQMB m256 ymm k k
// VPSHUFBITQMB m256 ymm k
// VPSHUFBITQMB xmm xmm k k
// VPSHUFBITQMB xmm xmm k
// VPSHUFBITQMB ymm ymm k k
// VPSHUFBITQMB ymm ymm k
// VPSHUFBITQMB zmm zmm k k
// VPSHUFBITQMB zmm zmm k
// VPSHUFBITQMB m512 zmm k k
// VPSHUFBITQMB m512 zmm k
//
// Construct and append a VPSHUFBITQMB instruction to the active function.
// Operates on the global context.
func VPSHUFBITQMB(ops ...operand.Op) { ctx.VPSHUFBITQMB(ops...) }
// VPSHUFB_Z: Packed Shuffle Bytes (Zeroing Masking).
//
// Forms: