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:
committed by
GitHub
parent
a42c8ae281
commit
05ed388d0f
@@ -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:
|
||||
|
||||
@@ -2672,6 +2672,8 @@ func TestContextInstructions(t *testing.T) {
|
||||
ctx.VPMULUDQ_BCST(opm64, opxmm, opk, opxmm)
|
||||
ctx.VPMULUDQ_BCST_Z(opm64, opxmm, opk, opxmm)
|
||||
ctx.VPMULUDQ_Z(opm128, opxmm, opk, opxmm)
|
||||
ctx.VPOPCNTB(opm128, opk, opxmm)
|
||||
ctx.VPOPCNTB_Z(opm128, opk, opxmm)
|
||||
ctx.VPOPCNTD(opm128, opk, opxmm)
|
||||
ctx.VPOPCNTD_BCST(opm32, opk, opxmm)
|
||||
ctx.VPOPCNTD_BCST_Z(opm32, opk, opxmm)
|
||||
@@ -2680,6 +2682,8 @@ func TestContextInstructions(t *testing.T) {
|
||||
ctx.VPOPCNTQ_BCST(opm64, opk, opxmm)
|
||||
ctx.VPOPCNTQ_BCST_Z(opm64, opk, opxmm)
|
||||
ctx.VPOPCNTQ_Z(opm128, opk, opxmm)
|
||||
ctx.VPOPCNTW(opm128, opk, opxmm)
|
||||
ctx.VPOPCNTW_Z(opm128, opk, opxmm)
|
||||
ctx.VPOR(opm256, opymm, opymm)
|
||||
ctx.VPORD(opm128, opxmm, opk, opxmm)
|
||||
ctx.VPORD_BCST(opm32, opxmm, opk, opxmm)
|
||||
@@ -2727,6 +2731,7 @@ func TestContextInstructions(t *testing.T) {
|
||||
ctx.VPSCATTERQD(opxmm, opk, opvm64x)
|
||||
ctx.VPSCATTERQQ(opxmm, opk, opvm64x)
|
||||
ctx.VPSHUFB(opm256, opymm, opymm)
|
||||
ctx.VPSHUFBITQMB(opm128, opxmm, opk, opk)
|
||||
ctx.VPSHUFB_Z(opm128, opxmm, opk, opxmm)
|
||||
ctx.VPSHUFD(opimm8, opm256, opymm)
|
||||
ctx.VPSHUFD_BCST(opimm8, opm32, opk, opxmm)
|
||||
|
||||
Reference in New Issue
Block a user