Debian Codegraph @

internal/opcodesextra/vpopcntdq.go

raw symbols SCIP
1 package opcodesextra
2
3 import "github.com/mmcloughlin/avo/internal/inst"
4
5 // vpopcntdq is the "Vector Population Count" instruction set.
6 var vpopcntdq = []*inst.Instruction{
7 // Reference: https://github.com/golang/go/blob/go1.19.3/src/cmd/internal/obj/x86/avx_optabs.go#L3741-L3750
8 //
9 // {as: AVPOPCNTD, ytab: _yvexpandpd, prefix: Pavx, op: opBytes{
10 // avxEscape | evex128 | evex66 | evex0F38 | evexW0, evexN16 | evexBcstN4 | evexZeroingEnabled, 0x55,
11 // avxEscape | evex256 | evex66 | evex0F38 | evexW0, evexN32 | evexBcstN4 | evexZeroingEnabled, 0x55,
12 // avxEscape | evex512 | evex66 | evex0F38 | evexW0, evexN64 | evexBcstN4 | evexZeroingEnabled, 0x55,
13 // }},
14 // {as: AVPOPCNTQ, ytab: _yvexpandpd, prefix: Pavx, op: opBytes{
15 // avxEscape | evex128 | evex66 | evex0F38 | evexW1, evexN16 | evexBcstN8 | evexZeroingEnabled, 0x55,
16 // avxEscape | evex256 | evex66 | evex0F38 | evexW1, evexN32 | evexBcstN8 | evexZeroingEnabled, 0x55,
17 // avxEscape | evex512 | evex66 | evex0F38 | evexW1, evexN64 | evexBcstN8 | evexZeroingEnabled, 0x55,
18 // }},
19 //
20 // Note the opcodes database already contains the non-AVX512VL forms. They
21 // are overridden by the definitions below.
22 {
23 Opcode: "VPOPCNTD",
24 Summary: "Packed Population Count for Doubleword Integers",
25 Forms: vpopcntdqforms("/m32bcst"),
26 },
27 {
28 Opcode: "VPOPCNTQ",
29 Summary: "Packed Population Count for Quadword Integers",
30 Forms: vpopcntdqforms("/m64bcst"),
31 },
32 }
33
34 // VPOPCNTD and VPOPCNTQ forms.
35 //
36 // See: https://www.felixcloutier.com/x86/vpopcnt
37 //
38 // Reference: https://github.com/golang/go/blob/go1.19.3/src/cmd/internal/obj/x86/avx_optabs.go#L376-L383
39 //
40 // var _yvexpandpd = []ytab{
41 // {zcase: Zevex_rm_v_r, zoffset: 0, args: argList{YxmEvex, YxrEvex}},
42 // {zcase: Zevex_rm_k_r, zoffset: 3, args: argList{YxmEvex, Yknot0, YxrEvex}},
43 // {zcase: Zevex_rm_v_r, zoffset: 0, args: argList{YymEvex, YyrEvex}},
44 // {zcase: Zevex_rm_k_r, zoffset: 3, args: argList{YymEvex, Yknot0, YyrEvex}},
45 // {zcase: Zevex_rm_v_r, zoffset: 0, args: argList{Yzm, Yzr}},
46 // {zcase: Zevex_rm_k_r, zoffset: 3, args: argList{Yzm, Yknot0, Yzr}},
47 // }
48 func vpopcntdqforms(bcst string) inst.Forms { return _yvexpandpd("AVX512VPOPCNTDQ", bcst) }