Amiri
Amiri

Reputation: 2536

How to count number of avx and avx2 instruction set

The number of Intel SSE4.2 is exactly 313 assembly instruction sets(sum the Intel manual numbers). I want the same number for AVX and AVX2 but couldn't find any trusted reference. I found a reference that tells there are 292 instructions in AVX (page 1, Table 1) and its wrong and SSE4.2 is containing SSSE3 that they didn't count it. So how can I count the AVX/AVX2 instructions? (I thought to write a program and copy the Intel intrinsics guide to a text file and process it. But I need an easier way

Upvotes: 3

Views: 1117

Answers (2)

Amiri
Amiri

Reputation: 2536

This resource also provide an answer to this question:

Intel AVX is a comprehensive ISA enhancement that adds n ew functionality in addition to the compact new encoding format.

• A large number (200+) of legacy Intel SSEx instruction s are upgraded by the enhanced instruction encoding to take advantage of feat ures like a distinct source operand and flexible memory alignment.

• A moderate number (< 100) of legacy 128-bit Intel SS Ex instruction have been promoted to process 256-bit vector data.

• A number of new data processing and arithmetic operatio ns (< 100), not present in legacy Intel SSEx, are added to Intel processors to be launched in 2010 and beyond.

Upvotes: 1

ADMS
ADMS

Reputation: 108

There are 86 instructions in AVX and 137 instructions in AVX2 and totally 223 new instructions introduced by AVX and AVX2. I've copied the Intel intrinsics guide to a word format, deleted intrinsics functions, sorted the assembly instructions and deleted the duplicated instructions. This assumes that all instructions have corresponding intrinsics

AVX ins: vaddpd, vaddps, vaddsubpd, vaddsubps, vandnpd, vandnps, vandpd, vandps, vblendpd, vblendps, vblendvpd, vblendvps, vbroadcastf128, vbroadcastsd, vbroadcastss, vcmppd, vcmpps, vcmpsd, vcmpss, vcvtdq2pd, vcvtdq2ps, vcvtpd2dq, vcvtpd2ps, vcvtps2dq, vcvtps2pd, vcvttpd2dq, vcvttps2dq, vdivpd, vdivps, vdpps, vextractf128, vhaddpd, vhaddps, vhsubpd, vhsubps, vinsertf128, vlddqu, vmaskmovpd, vmaskmovps, vmaxpd, vmaxps, vminpd, vminps, vmovapd, vmovaps, vmovddup, vmovdqa, vmovdqu, vmovmskpd, vmovmskps, vmovntdq, vmovntpd, vmovntps, vmovshdup, vmovsldup, vmovupd, vmovups, vmulpd, vmulps, vorpd, vorps, vperm2f128, vpermilpd, vpermilps, vptest, vpxor, vrcpps, vroundpd, vroundps, vrsqrtps, vshufpd, vshufps, vsqrtpd, vsqrtps, vsubpd, vsubps, vtestpd, vtestps, vunpckhpd, vunpckhps, vunpcklpd, vunpcklps, vxorpd, vxorps, vzeroall, vzeroupper,

and AVX2 ins : movddup, vbroadcasti128, vextracti128, vgatherdpd, vgatherdps, vgatherqpd, vgatherqps, vinserti128, vmovntdqa, vmpsadbw, vpabsb, vpabsd, vpabsw, vpackssdw, vpacksswb, vpackusdw, vpackuswb, vpaddb, vpaddd, vpaddq, vpaddsb, vpaddsw, vpaddusb, vpaddusw, vpaddw, vpalignr, vpand, vpandn, vpavgb, vpavgw, vpblendd, vpblendvb, vpblendw, vpbroadcastb, vpbroadcastd, vpbroadcastq, vpbroadcastw, vpcmpeqb, vpcmpeqd, vpcmpeqq, vpcmpeqw, vpcmpgtb, vpcmpgtd, vpcmpgtq, vpcmpgtw, vperm2i128, vpermd, vpermpd, vpermps, vpermq, vpgatherdd, vpgatherdq, vpgatherqd, vpgatherqq, vphaddd, vphaddsw, vphaddw, vphsubd, vphsubsw, vphsubw, vpmaddubsw, vpmaddwd, vpmaskmovd, vpmaskmovq, vpmaxsb, vpmaxsd, vpmaxsw, vpmaxub, vpmaxud, vpmaxuw, vpminsb, vpminsd, vpminsw, vpminub, vpminud, vpminuw, vpmovmskb, vpmovsxbd, vpmovsxbq, vpmovsxbw, vpmovsxdq, vpmovsxwd, vpmovsxwq, vpmovzxbd, vpmovzxbq, vpmovzxbw, vpmovzxdq, vpmovzxwd, vpmovzxwq, vpmuldq, vpmulhrsw, vpmulhuw, vpmulhw, vpmulld, vpmullw, vpmuludq, vpor, vpsadbw, vpshufb, vpshufd, vpshufhw, vpshuflw, vpsignb, vpsignd, vpsignw, vpslld, vpslldq, vpsllq, vpsllvd, vpsllvq, vpsllw, vpsrad, vpsravd, vpsraw, vpsrld, vpsrldq, vpsrlq, vpsrlvd, vpsrlvq, vpsrlw, vpsubb, vpsubd, vpsubq, vpsubsb, vpsubsw, vpsubusb, vpsubusw, vpsubw, vpunpckhbw, vpunpckhdq, vpunpckhqdq, vpunpckhwd, vpunpcklbw, vpunpckldq, vpunpcklqdq, vpunpcklwd, vpxor.

Upvotes: 5

Related Questions