all: VPOPCNTDQ instructions (#361)
Adds the VPOPCNTDQ instruction set, providing packed population count for double and quadword integers. These are added via the `opcodesextra` mechanism #345, since they're missing from the opcodes database. In this case the 512-bit non-AVX512VL forms are added here as well as the opcodes database, but they're deduplicated later. 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
7dac51aabf
commit
a42c8ae281
@@ -69248,6 +69248,14 @@ func VPMULUDQ_Z(mxyz, xyz, k, xyz1 operand.Op) { ctx.VPMULUDQ_Z(mxyz, xyz, k, xy
|
||||
//
|
||||
// Forms:
|
||||
//
|
||||
// VPOPCNTD m128 k xmm
|
||||
// VPOPCNTD m128 xmm
|
||||
// VPOPCNTD m256 k ymm
|
||||
// VPOPCNTD m256 ymm
|
||||
// VPOPCNTD xmm k xmm
|
||||
// VPOPCNTD xmm xmm
|
||||
// VPOPCNTD ymm k ymm
|
||||
// VPOPCNTD ymm ymm
|
||||
// VPOPCNTD m512 k zmm
|
||||
// VPOPCNTD m512 zmm
|
||||
// VPOPCNTD zmm k zmm
|
||||
@@ -69262,6 +69270,14 @@ func (c *Context) VPOPCNTD(ops ...operand.Op) {
|
||||
//
|
||||
// Forms:
|
||||
//
|
||||
// VPOPCNTD m128 k xmm
|
||||
// VPOPCNTD m128 xmm
|
||||
// VPOPCNTD m256 k ymm
|
||||
// VPOPCNTD m256 ymm
|
||||
// VPOPCNTD xmm k xmm
|
||||
// VPOPCNTD xmm xmm
|
||||
// VPOPCNTD ymm k ymm
|
||||
// VPOPCNTD ymm ymm
|
||||
// VPOPCNTD m512 k zmm
|
||||
// VPOPCNTD m512 zmm
|
||||
// VPOPCNTD zmm k zmm
|
||||
@@ -69275,6 +69291,10 @@ func VPOPCNTD(ops ...operand.Op) { ctx.VPOPCNTD(ops...) }
|
||||
//
|
||||
// Forms:
|
||||
//
|
||||
// VPOPCNTD.BCST m32 k xmm
|
||||
// VPOPCNTD.BCST m32 k ymm
|
||||
// VPOPCNTD.BCST m32 xmm
|
||||
// VPOPCNTD.BCST m32 ymm
|
||||
// VPOPCNTD.BCST m32 k zmm
|
||||
// VPOPCNTD.BCST m32 zmm
|
||||
//
|
||||
@@ -69287,6 +69307,10 @@ func (c *Context) VPOPCNTD_BCST(ops ...operand.Op) {
|
||||
//
|
||||
// Forms:
|
||||
//
|
||||
// VPOPCNTD.BCST m32 k xmm
|
||||
// VPOPCNTD.BCST m32 k ymm
|
||||
// VPOPCNTD.BCST m32 xmm
|
||||
// VPOPCNTD.BCST m32 ymm
|
||||
// VPOPCNTD.BCST m32 k zmm
|
||||
// VPOPCNTD.BCST m32 zmm
|
||||
//
|
||||
@@ -69298,50 +69322,70 @@ func VPOPCNTD_BCST(ops ...operand.Op) { ctx.VPOPCNTD_BCST(ops...) }
|
||||
//
|
||||
// Forms:
|
||||
//
|
||||
// VPOPCNTD.BCST.Z m32 k xmm
|
||||
// VPOPCNTD.BCST.Z m32 k ymm
|
||||
// VPOPCNTD.BCST.Z m32 k zmm
|
||||
//
|
||||
// Construct and append a VPOPCNTD.BCST.Z instruction to the active function.
|
||||
func (c *Context) VPOPCNTD_BCST_Z(m, k, z operand.Op) {
|
||||
c.addinstruction(x86.VPOPCNTD_BCST_Z(m, k, z))
|
||||
func (c *Context) VPOPCNTD_BCST_Z(m, k, xyz operand.Op) {
|
||||
c.addinstruction(x86.VPOPCNTD_BCST_Z(m, k, xyz))
|
||||
}
|
||||
|
||||
// VPOPCNTD_BCST_Z: Packed Population Count for Doubleword Integers (Broadcast, Zeroing Masking).
|
||||
//
|
||||
// Forms:
|
||||
//
|
||||
// VPOPCNTD.BCST.Z m32 k xmm
|
||||
// VPOPCNTD.BCST.Z m32 k ymm
|
||||
// VPOPCNTD.BCST.Z m32 k zmm
|
||||
//
|
||||
// Construct and append a VPOPCNTD.BCST.Z instruction to the active function.
|
||||
// Operates on the global context.
|
||||
func VPOPCNTD_BCST_Z(m, k, z operand.Op) { ctx.VPOPCNTD_BCST_Z(m, k, z) }
|
||||
func VPOPCNTD_BCST_Z(m, k, xyz operand.Op) { ctx.VPOPCNTD_BCST_Z(m, k, xyz) }
|
||||
|
||||
// VPOPCNTD_Z: Packed Population Count for Doubleword Integers (Zeroing Masking).
|
||||
//
|
||||
// Forms:
|
||||
//
|
||||
// VPOPCNTD.Z m128 k xmm
|
||||
// VPOPCNTD.Z m256 k ymm
|
||||
// VPOPCNTD.Z xmm k xmm
|
||||
// VPOPCNTD.Z ymm k ymm
|
||||
// VPOPCNTD.Z m512 k zmm
|
||||
// VPOPCNTD.Z zmm k zmm
|
||||
//
|
||||
// Construct and append a VPOPCNTD.Z instruction to the active function.
|
||||
func (c *Context) VPOPCNTD_Z(mz, k, z operand.Op) {
|
||||
c.addinstruction(x86.VPOPCNTD_Z(mz, k, z))
|
||||
func (c *Context) VPOPCNTD_Z(mxyz, k, xyz operand.Op) {
|
||||
c.addinstruction(x86.VPOPCNTD_Z(mxyz, k, xyz))
|
||||
}
|
||||
|
||||
// VPOPCNTD_Z: Packed Population Count for Doubleword Integers (Zeroing Masking).
|
||||
//
|
||||
// Forms:
|
||||
//
|
||||
// VPOPCNTD.Z m128 k xmm
|
||||
// VPOPCNTD.Z m256 k ymm
|
||||
// VPOPCNTD.Z xmm k xmm
|
||||
// VPOPCNTD.Z ymm k ymm
|
||||
// VPOPCNTD.Z m512 k zmm
|
||||
// VPOPCNTD.Z zmm k zmm
|
||||
//
|
||||
// Construct and append a VPOPCNTD.Z instruction to the active function.
|
||||
// Operates on the global context.
|
||||
func VPOPCNTD_Z(mz, k, z operand.Op) { ctx.VPOPCNTD_Z(mz, k, z) }
|
||||
func VPOPCNTD_Z(mxyz, k, xyz operand.Op) { ctx.VPOPCNTD_Z(mxyz, k, xyz) }
|
||||
|
||||
// VPOPCNTQ: Packed Population Count for Quadword Integers.
|
||||
//
|
||||
// Forms:
|
||||
//
|
||||
// VPOPCNTQ m128 k xmm
|
||||
// VPOPCNTQ m128 xmm
|
||||
// VPOPCNTQ m256 k ymm
|
||||
// VPOPCNTQ m256 ymm
|
||||
// VPOPCNTQ xmm k xmm
|
||||
// VPOPCNTQ xmm xmm
|
||||
// VPOPCNTQ ymm k ymm
|
||||
// VPOPCNTQ ymm ymm
|
||||
// VPOPCNTQ m512 k zmm
|
||||
// VPOPCNTQ m512 zmm
|
||||
// VPOPCNTQ zmm k zmm
|
||||
@@ -69356,6 +69400,14 @@ func (c *Context) VPOPCNTQ(ops ...operand.Op) {
|
||||
//
|
||||
// Forms:
|
||||
//
|
||||
// VPOPCNTQ m128 k xmm
|
||||
// VPOPCNTQ m128 xmm
|
||||
// VPOPCNTQ m256 k ymm
|
||||
// VPOPCNTQ m256 ymm
|
||||
// VPOPCNTQ xmm k xmm
|
||||
// VPOPCNTQ xmm xmm
|
||||
// VPOPCNTQ ymm k ymm
|
||||
// VPOPCNTQ ymm ymm
|
||||
// VPOPCNTQ m512 k zmm
|
||||
// VPOPCNTQ m512 zmm
|
||||
// VPOPCNTQ zmm k zmm
|
||||
@@ -69369,6 +69421,10 @@ func VPOPCNTQ(ops ...operand.Op) { ctx.VPOPCNTQ(ops...) }
|
||||
//
|
||||
// Forms:
|
||||
//
|
||||
// VPOPCNTQ.BCST m64 k xmm
|
||||
// VPOPCNTQ.BCST m64 k ymm
|
||||
// VPOPCNTQ.BCST m64 xmm
|
||||
// VPOPCNTQ.BCST m64 ymm
|
||||
// VPOPCNTQ.BCST m64 k zmm
|
||||
// VPOPCNTQ.BCST m64 zmm
|
||||
//
|
||||
@@ -69381,6 +69437,10 @@ func (c *Context) VPOPCNTQ_BCST(ops ...operand.Op) {
|
||||
//
|
||||
// Forms:
|
||||
//
|
||||
// VPOPCNTQ.BCST m64 k xmm
|
||||
// VPOPCNTQ.BCST m64 k ymm
|
||||
// VPOPCNTQ.BCST m64 xmm
|
||||
// VPOPCNTQ.BCST m64 ymm
|
||||
// VPOPCNTQ.BCST m64 k zmm
|
||||
// VPOPCNTQ.BCST m64 zmm
|
||||
//
|
||||
@@ -69392,45 +69452,57 @@ func VPOPCNTQ_BCST(ops ...operand.Op) { ctx.VPOPCNTQ_BCST(ops...) }
|
||||
//
|
||||
// Forms:
|
||||
//
|
||||
// VPOPCNTQ.BCST.Z m64 k xmm
|
||||
// VPOPCNTQ.BCST.Z m64 k ymm
|
||||
// VPOPCNTQ.BCST.Z m64 k zmm
|
||||
//
|
||||
// Construct and append a VPOPCNTQ.BCST.Z instruction to the active function.
|
||||
func (c *Context) VPOPCNTQ_BCST_Z(m, k, z operand.Op) {
|
||||
c.addinstruction(x86.VPOPCNTQ_BCST_Z(m, k, z))
|
||||
func (c *Context) VPOPCNTQ_BCST_Z(m, k, xyz operand.Op) {
|
||||
c.addinstruction(x86.VPOPCNTQ_BCST_Z(m, k, xyz))
|
||||
}
|
||||
|
||||
// VPOPCNTQ_BCST_Z: Packed Population Count for Quadword Integers (Broadcast, Zeroing Masking).
|
||||
//
|
||||
// Forms:
|
||||
//
|
||||
// VPOPCNTQ.BCST.Z m64 k xmm
|
||||
// VPOPCNTQ.BCST.Z m64 k ymm
|
||||
// VPOPCNTQ.BCST.Z m64 k zmm
|
||||
//
|
||||
// Construct and append a VPOPCNTQ.BCST.Z instruction to the active function.
|
||||
// Operates on the global context.
|
||||
func VPOPCNTQ_BCST_Z(m, k, z operand.Op) { ctx.VPOPCNTQ_BCST_Z(m, k, z) }
|
||||
func VPOPCNTQ_BCST_Z(m, k, xyz operand.Op) { ctx.VPOPCNTQ_BCST_Z(m, k, xyz) }
|
||||
|
||||
// VPOPCNTQ_Z: Packed Population Count for Quadword Integers (Zeroing Masking).
|
||||
//
|
||||
// Forms:
|
||||
//
|
||||
// VPOPCNTQ.Z m128 k xmm
|
||||
// VPOPCNTQ.Z m256 k ymm
|
||||
// VPOPCNTQ.Z xmm k xmm
|
||||
// VPOPCNTQ.Z ymm k ymm
|
||||
// VPOPCNTQ.Z m512 k zmm
|
||||
// VPOPCNTQ.Z zmm k zmm
|
||||
//
|
||||
// Construct and append a VPOPCNTQ.Z instruction to the active function.
|
||||
func (c *Context) VPOPCNTQ_Z(mz, k, z operand.Op) {
|
||||
c.addinstruction(x86.VPOPCNTQ_Z(mz, k, z))
|
||||
func (c *Context) VPOPCNTQ_Z(mxyz, k, xyz operand.Op) {
|
||||
c.addinstruction(x86.VPOPCNTQ_Z(mxyz, k, xyz))
|
||||
}
|
||||
|
||||
// VPOPCNTQ_Z: Packed Population Count for Quadword Integers (Zeroing Masking).
|
||||
//
|
||||
// Forms:
|
||||
//
|
||||
// VPOPCNTQ.Z m128 k xmm
|
||||
// VPOPCNTQ.Z m256 k ymm
|
||||
// VPOPCNTQ.Z xmm k xmm
|
||||
// VPOPCNTQ.Z ymm k ymm
|
||||
// VPOPCNTQ.Z m512 k zmm
|
||||
// VPOPCNTQ.Z zmm k zmm
|
||||
//
|
||||
// Construct and append a VPOPCNTQ.Z instruction to the active function.
|
||||
// Operates on the global context.
|
||||
func VPOPCNTQ_Z(mz, k, z operand.Op) { ctx.VPOPCNTQ_Z(mz, k, z) }
|
||||
func VPOPCNTQ_Z(mxyz, k, xyz operand.Op) { ctx.VPOPCNTQ_Z(mxyz, k, xyz) }
|
||||
|
||||
// VPOR: Packed Bitwise Logical OR.
|
||||
//
|
||||
|
||||
@@ -2672,14 +2672,14 @@ 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.VPOPCNTD(opm512, opk, opzmm)
|
||||
ctx.VPOPCNTD_BCST(opm32, opk, opzmm)
|
||||
ctx.VPOPCNTD_BCST_Z(opm32, opk, opzmm)
|
||||
ctx.VPOPCNTD_Z(opm512, opk, opzmm)
|
||||
ctx.VPOPCNTQ(opm512, opk, opzmm)
|
||||
ctx.VPOPCNTQ_BCST(opm64, opk, opzmm)
|
||||
ctx.VPOPCNTQ_BCST_Z(opm64, opk, opzmm)
|
||||
ctx.VPOPCNTQ_Z(opm512, opk, opzmm)
|
||||
ctx.VPOPCNTD(opm128, opk, opxmm)
|
||||
ctx.VPOPCNTD_BCST(opm32, opk, opxmm)
|
||||
ctx.VPOPCNTD_BCST_Z(opm32, opk, opxmm)
|
||||
ctx.VPOPCNTD_Z(opm128, opk, opxmm)
|
||||
ctx.VPOPCNTQ(opm128, opk, opxmm)
|
||||
ctx.VPOPCNTQ_BCST(opm64, opk, opxmm)
|
||||
ctx.VPOPCNTQ_BCST_Z(opm64, opk, opxmm)
|
||||
ctx.VPOPCNTQ_Z(opm128, opk, opxmm)
|
||||
ctx.VPOR(opm256, opymm, opymm)
|
||||
ctx.VPORD(opm128, opxmm, opk, opxmm)
|
||||
ctx.VPORD_BCST(opm32, opxmm, opk, opxmm)
|
||||
|
||||
Reference in New Issue
Block a user