Knowledge (XXG)

x86 Bit manipulation instruction set

Source 📝

1316: 1304:
resulting in the instructions executing significantly slower than the same behaviour recreated using other instructions. (A software method called "zp7" is, in fact, faster on these machines.) For optimum performance it is recommended that compiler developers choose to use individual instructions in the extensions based on architecture specific performance profiles rather than on extension availability.
847:
does the opposite for the selected bits: contiguous low-order bits are copied to selected bits of the destination; other destination bits are cleared. This can be used to extract any bitfield of the input, and even do a lot of bit-level shuffling that previously would have been expensive. While
1303:
Note that instruction extension support means the processor is capable of executing the supported instructions for software compatibility purposes. The processor might not perform well doing so. For example, Excavator through Zen 2 processors implement PEXT and PDEP instructions using microcode
201:) instruction, but sets the ZF (if the result is zero) and CF (if the source is zero) flags rather than setting the ZF (if the source is zero). Also, it produces a defined result (the source operand size in bits) if the source operand is zero. For a non-zero argument, sum of 937:
TBM consists of instructions complementary to the instruction set started by BMI1; their complementary nature means they do not necessarily need to be used directly but can be generated by an optimizing compiler when supported. AMD introduced TBM together with BMI1 in its
838:
instructions are new generalized bit-level compress and expand instructions. They take two inputs; one is a source, and the other is a selector. The selector is a bitmap selecting the bits that are to be packed or unpacked.
111:) instruction set, then later added support for Intel's new BMI2 instructions. AMD today advertises the availability of these features via Intel's BMI1 and BMI2 cpuflags and instructs programmers to target them accordingly. 928:
AMD processors before Zen 3 that implement PDEP and PEXT do so in microcode, with a latency of 18 cycles rather than (Zen 3) 3 cycles. As a result it is often faster to use other instructions on these processors.
1685: 652:) instruction, but sets the ZF (if the result is zero) and CF (if the source is zero) flags rather than setting the ZF (if the source is zero). For a non-zero argument, the result of 683:
Intel introduced BMI2 together with BMI1 in its line of Haswell processors. Only AMD has produced processors supporting BMI1 without BMI2; BMI2 is supported by AMDs
2600: 1590: 2439: 2403: 2293: 75:
microarchitecture with BMI1 matching features offered by AMD's ABM instruction set and BMI2 extending them. Another two sets were published by AMD: ABM (
2481: 1825: 1619: 1689: 2969: 2000: 1662: 2526: 1561: 2148: 1957: 1868: 2593: 2694: 2612: 2511: 2469: 849: 2975: 2854: 2730: 2620: 2255: 2243: 2238: 2233: 2228: 843:
copies selected bits from the source to contiguous low-order bits of the destination; higher-order destination bits are cleared.
2985: 2624: 1494: 1390: 863:
The instructions are available in 32-bit and 64-bit versions. An example using arbitrary source and selector in 32-bit mode is:
1266: 2586: 2496: 2286: 1260: 1187: 92: 2551: 1272: 1254: 1209: 684: 1888: 1802:"Saving Private Ryzen: PEXT/PDEP 32/64b replacement functions for #AMD CPUs (BR/#Zen/Zen+/#Zen2) based on @zwegner's zp7" 942:
line of processors; later AMD Jaguar and Zen-based processors do not support TBM. No Intel processors (at least through
2871: 2531: 2398: 1993: 41: 2486: 1321: 1205: 1201: 1179: 257: 72: 2829: 2793: 2342: 2196: 1330: 1237: 249: 1845: 71:
There are two sets published by Intel: BMI (now referred to as BMI1) and BMI2; they were both introduced with the
3043: 3038: 2944: 2900: 2755: 2279: 2506: 1243: 1740: 2950: 2879: 2650: 2645: 2546: 2536: 2464: 1986: 1950: 1712: 1280: 96: 2718: 2567: 2491: 2357: 2332: 1217: 939: 253: 53: 2920: 2743: 2541: 2393: 2206: 2123: 1341: 2961: 2932: 2677: 1713:"A New Basis for Shifters in General-Purpose Processors for Existing and Advanced Bit Manipulations" 2914: 2811: 2805: 2260: 2221: 2216: 2211: 2201: 2034: 1941: 1361: 1351: 1336: 122:
as part of BMI1, both Intel and AMD advertise the presence of these two instructions individually.
3005: 2999: 2993: 2474: 1893: 1231: 65: 2118: 1973: 1777: 1525: 860:
instructions (like the rest of the BMI instruction sets) operate on general-purpose registers.
107:
AMD was the first to introduce the instructions that now form Intel's BMI1 as part of its ABM (
2884: 2682: 2662: 2449: 2408: 1953: 1366: 1173: 49: 2846: 2459: 2352: 1801: 57: 1591:"How to detect New Instruction support in the 4th generation Intel® Core™ processor family" 1484:"AMD64 Architecture Programmer's Manual, Volume 3: General-Purpose and System Instructions" 2609: 2516: 2337: 1417:"AMD64 Architecture Programmer's Manual Volume 3: General-Purpose and System Instructions" 17: 1754: 2143: 1946: 186: 169: 45: 1483: 1416: 3032: 2362: 2158: 2138: 2133: 2367: 1183: 1275:
processors and newer (ABM, BMI1, BMI2 and TBM supported; microcoded PEXT and PDEP)
1297:
processors and newer (ABM, BMI1 and BMI2 supported; full hardware implementation)
2908: 2372: 1315: 729:
Unsigned multiply without affecting flags, and arbitrary destination registers
2454: 2413: 2327: 2153: 2093: 2088: 2044: 1311: 1194: 943: 2578: 2938: 2860: 2701: 2638: 2633: 2521: 2501: 2377: 2347: 2128: 2098: 1356: 209:
results is argument bit width minus 1 (for example, if 32-bit argument is
2322: 2317: 2168: 2163: 142:
combined with BMI1 and BMI2 completes the expanded ABM instruction set).
1869:"AMD Zen 3 Ryzen Deep Dive Review: 5950X, 5900X, 5800X and 5600X Tested" 1642: 2823: 2706: 2689: 2672: 2655: 2072: 1444: 1222: 2926: 2889: 2749: 2191: 2186: 2039: 2029: 1921: 1667: 56:. The purpose of these instruction sets is to improve the speed of 2271: 1291:
processors (ABM, BMI1 and BMI2 supported; microcoded PEXT and PDEP)
1284: 2835: 2773: 2713: 2423: 2418: 2302: 2024: 1598: 1455: 1294: 1288: 127: 1978: 1916: 2817: 2799: 2785: 2779: 2767: 2761: 2667: 2444: 2250: 2067: 1346: 95:-based processors as an extension to BMI1, but dropped again in 84: 80: 61: 2582: 2275: 1982: 2734: 2009: 1536: 1490: 38: 1686:"AMD Excavator Core May Bring Dramatic Performance Increases" 1778:"Software Optimization Guide for AMD Family 19h Processors" 1889:"Dolphin Progress Report: December 2019 and January 2020" 1680: 1678: 1445:"Intel Advanced Vector Extensions Programming Reference" 1385: 1383: 714:
Zero high bits starting with specified bit position ;
1846:"BIOS and Kernel Developer's Guide for AMD Family 14h" 1722:. IEEE Transactions on Computers. pp. 1035–1048 1369:(also used for advanced bit manipulation techniques) 2984: 2960: 2898: 2870: 2845: 2729: 2619: 2560: 2432: 2386: 2310: 2179: 2111: 2081: 2060: 2053: 2017: 848:what these instructions do is similar to bit level 130:flag of the same name, and Intel and AMD use AMD's 1411: 1409: 980:(src >> start) & ((1 << len) - 1) 314:(src >> start) & ((1 << len) - 1) 1555: 1553: 671:is such that if BMI1 is not supported, then the 232:The instructions below are those enabled by the 1562:"New "Bulldozer" and "Piledriver" instructions" 1391:"New "Bulldozer" and "Piledriver" Instructions" 789:Shift arithmetic right without affecting flags 248:CPUID feature flag. BMI1 is available in AMD's 220:is such that if ABM is not supported, then the 2857:(ABM: 2007, BMI1: 2012, BMI2: 2013, TBM: 2012) 1688:. X-bit labs. October 18, 2013. Archived from 2594: 2287: 1994: 1741:"Zen 3 - Microarchitectures - AMD - WikiChip" 1711:Yedidya Hilewitz; Ruby B. Lee (August 2009). 1584: 1582: 1520: 1518: 1516: 1514: 1246:processors and newer (ABM and BMI1 supported) 1240:processors and newer (ABM and BMI1 supported) 774:Rotate right logical without affecting flags 648:is almost identical to the Bit Scan Forward ( 60:. All the instructions in these sets are non- 8: 1478: 1476: 1474: 1472: 804:Shift logical right without affecting flags 819:Shift logical left without affecting flags 2601: 2587: 2579: 2440:Advanced Programmable Interrupt Controller 2404:Intel Communication Streaming Architecture 2294: 2280: 2272: 2057: 2001: 1987: 1979: 1643:"sandpile.org -- x86 architecture -- bits" 1637: 1635: 1439: 1437: 1435: 27:X86 instruction set architecture extension 2482:High-bandwidth Digital Content Protection 679:BMI2 (Bit Manipulation Instruction Set 2) 236:bit in CPUID. Intel officially considers 228:BMI1 (Bit Manipulation Instruction Set 1) 1269:processors (ABM, BMI1 and TBM supported) 1263:processors (ABM, BMI1 and TBM supported) 1036:Isolate lowest clear bit and complement 948: 865: 689: 262: 144: 2917:(2008); ARMv8 also has AES instructions 1379: 390:Count the number of trailing zero bits 2527:Platform Environment Control Interface 1116:Isolate lowest set bit and complement 256:and newer processors, and in Intel's 213:, LZCNT gives 12, and BSR gives 19). 7: 1526:"Family 16h AMD A-Series Data Sheet" 197:is related to the Bit Scan Reverse ( 64:and operate only on general-purpose 976:Bit field extract (with immediate) 2512:Host Embedded Controller Interface 310:Bit field extract (with register) 31:Bit manipulation instructions sets 25: 675:instruction is executed instead. 224:instruction is executed instead. 3017:Suspended extensions' dates are 1915:Wegner, Zach (4 November 2020). 1314: 1212:) (ABM, BMI1 and BMI2 supported) 1136:Inverse mask from trailing ones 826:Parallel bit deposit and extract 330:Extract lowest set isolated bit 83:implemented by Intel as part of 1663:"Abseil - C++ Common Libraries" 1500:from the original on 2021-04-08 933:TBM (Trailing Bit Manipulation) 240:as part of BMI, but advertises 103:ABM (Advanced Bit Manipulation) 91:, an extension introduced with 350:Get mask up to lowest set bit 1: 1939:Warren Jr., Henry S. (2013). 1567:. Advanced Micro Devices, Inc 1251:"Heavy Equipment" processors 1197:processors (POPCNT supported) 2470:Active Management Technology 2399:MultiProcessor Specification 79:, which is also a subset of 42:instruction set architecture 1322:Computer programming portal 1228:"Cat" low-power processors 1204:processors and newer (like 1182:processors and newer (like 1056:Mask from lowest clear bit 996:Fill from lowest clear bit 3060: 1826:"tbmintrin.h from GCC 4.8" 1620:"bmiintrin.h from GCC 4.8" 1331:Advanced Vector Extensions 1257:processors (ABM supported) 1234:processors (ABM supported) 1225:processors (ABM supported) 3015: 1156:Mask from trailing zeros 1096:Fill from lowest set bit 1016:Isolate lowest clear bit 109:Advanced Bit Manipulation 89:Trailing Bit Manipulation 77:Advanced Bit Manipulation 18:Advanced Bit Manipulation 2814:(FMA4: 2011, FMA3: 2012) 2507:Serial Digital Video Out 2497:Rapid Storage Technology 961:Equivalent C expression 687:architecture and newer. 393: 275:Equivalent C expression 37:) are extensions to the 2872:Compressed instructions 2552:Ultra Path Interconnect 2537:Platform Controller Hub 2465:Intel Management Engine 1951:Pearson Education, Inc. 765:VEX.LZ.F2.0F3A F0 /r ib 2568:Silicon Photonics Link 2532:QuickPath Interconnect 1974:Intel Intrinsics Guide 1560:Hollingsworth, Brent. 759:Parallel bits extract 744:Parallel bits deposit 260:and newer processors. 118:as part of SSE4.2 and 114:While Intel considers 2542:System Management Bus 2487:High Definition Audio 2394:Common Building Block 2124:High Bandwidth Memory 1782:AMD Developer Central 1342:CLMUL instruction set 1076:Set lowest clear bit 370:Reset lowest set bit 2962:Transactional memory 1755:"Instruction tables" 1190:) (POPCNT supported) 810:VEX.LZ.66.0F38 F7 /r 795:VEX.LZ.F2.0F38 F7 /r 780:VEX.LZ.F3.0F38 F7 /r 750:VEX.LZ.F3.0F38 F5 /r 735:VEX.LZ.F2.0F38 F5 /r 720:VEX.LZ.F2.0F38 F6 /r 99:-based processors). 87:and BMI1), and TBM ( 1720:palms.princeton.edu 1692:on October 23, 2013 1362:XOP instruction set 1352:FMA instruction set 1337:AES instruction set 852:SIMD instructions, 187:Leading zeros count 1671:. 4 November 2021. 1589:Locktyukhin, Max. 967:XOP.LZ.0A 10 /r id 667:, the encoding of 244:support using the 3026: 3025: 2576: 2575: 2450:Intel Turbo Boost 2409:Intel Inboard 386 2269: 2268: 2107: 2106: 1959:978-0-321-84268-8 1897:. 7 February 2020 1489:. Revision 3.32. 1367:Intel BCD opcodes 1267:Steamroller-based 1165: 1164: 1140:~x | (x + 1) 1120:~x | (x - 1) 1020:x | ~(x + 1) 926: 925: 823: 822: 705:VEX.LZ.0F38 F5 /r 643: 642: 361:VEX.LZ.0F38 F3 /1 341:VEX.LZ.0F38 F3 /2 321:VEX.LZ.0F38 F3 /3 301:VEX.LZ.0F38 F7 /r 281:VEX.LZ.0F38 F2 /r 192: 191: 134:flag to indicate 16:(Redirected from 3051: 3044:AMD technologies 3039:X86 instructions 2847:Bit manipulation 2603: 2596: 2589: 2580: 2492:Hub Architecture 2460:Intel Secure Key 2296: 2289: 2282: 2273: 2058: 2003: 1996: 1989: 1980: 1963: 1942:Hacker's Delight 1927: 1926: 1912: 1906: 1905: 1903: 1902: 1894:Dolphin Emulator 1885: 1879: 1878: 1876: 1875: 1865: 1859: 1858: 1856: 1855: 1850: 1842: 1836: 1835: 1833: 1832: 1822: 1816: 1815: 1813: 1812: 1798: 1792: 1791: 1789: 1788: 1774: 1768: 1767: 1765: 1764: 1759: 1751: 1745: 1744: 1737: 1731: 1730: 1728: 1727: 1717: 1708: 1702: 1701: 1699: 1697: 1682: 1673: 1672: 1659: 1653: 1652: 1650: 1649: 1639: 1630: 1629: 1627: 1626: 1616: 1610: 1609: 1607: 1605: 1586: 1577: 1576: 1574: 1572: 1566: 1557: 1548: 1547: 1545: 1544: 1530: 1522: 1509: 1508: 1506: 1505: 1499: 1488: 1480: 1467: 1466: 1464: 1463: 1449: 1441: 1430: 1429: 1427: 1426: 1421: 1413: 1404: 1403: 1401: 1400: 1395: 1387: 1324: 1319: 1318: 1261:Piledriver-based 1161: 1160:~x & (x - 1) 1153: 1148: 1141: 1133: 1128: 1121: 1113: 1108: 1101: 1100:x | (x - 1) 1093: 1088: 1081: 1080:x | (x + 1) 1073: 1068: 1061: 1053: 1048: 1041: 1040:~x & (x + 1) 1033: 1028: 1021: 1013: 1008: 1001: 993: 988: 981: 973: 968: 949: 922: 917: 912: 907: 900: 895: 890: 885: 866: 859: 855: 846: 842: 837: 833: 816: 811: 801: 796: 786: 781: 771: 766: 756: 751: 741: 736: 726: 721: 711: 706: 690: 674: 670: 666: 659: 655: 651: 647: 637: 634: 631: 628: 625: 622: 619: 616: 613: 610: 607: 604: 601: 598: 595: 592: 589: 586: 583: 580: 577: 574: 571: 568: 565: 562: 559: 556: 553: 550: 547: 544: 541: 538: 535: 532: 529: 526: 523: 520: 517: 514: 511: 508: 505: 502: 499: 496: 493: 490: 487: 484: 481: 478: 475: 472: 469: 466: 463: 460: 457: 454: 451: 448: 445: 442: 439: 436: 433: 430: 427: 424: 421: 418: 415: 412: 409: 406: 403: 400: 397: 387: 382: 375: 367: 362: 355: 347: 342: 335: 327: 322: 315: 307: 302: 295: 290:Logical and not 287: 282: 263: 247: 243: 239: 235: 223: 219: 216:The encoding of 212: 208: 204: 200: 196: 183: 178: 170:Population count 166: 161: 145: 141: 137: 133: 125: 121: 117: 58:bit manipulation 21: 3059: 3058: 3054: 3053: 3052: 3050: 3049: 3048: 3029: 3028: 3027: 3022: 3011: 2980: 2956: 2894: 2866: 2841: 2725: 2615: 2610:Instruction set 2607: 2577: 2572: 2556: 2517:Hyper-threading 2428: 2382: 2306: 2300: 2270: 2265: 2175: 2103: 2077: 2049: 2035:Radeon Software 2013: 2007: 1970: 1960: 1938: 1935: 1933:Further reading 1930: 1914: 1913: 1909: 1900: 1898: 1887: 1886: 1882: 1873: 1871: 1867: 1866: 1862: 1853: 1851: 1848: 1844: 1843: 1839: 1830: 1828: 1824: 1823: 1819: 1810: 1808: 1800: 1799: 1795: 1786: 1784: 1776: 1775: 1771: 1762: 1760: 1757: 1753: 1752: 1748: 1739: 1738: 1734: 1725: 1723: 1715: 1710: 1709: 1705: 1695: 1693: 1684: 1683: 1676: 1661: 1660: 1656: 1647: 1645: 1641: 1640: 1633: 1624: 1622: 1618: 1617: 1613: 1603: 1601: 1588: 1587: 1580: 1570: 1568: 1564: 1559: 1558: 1551: 1542: 1540: 1528: 1524: 1523: 1512: 1503: 1501: 1497: 1486: 1482: 1481: 1470: 1461: 1459: 1447: 1443: 1442: 1433: 1424: 1422: 1419: 1415: 1414: 1407: 1398: 1396: 1393: 1389: 1388: 1381: 1377: 1372: 1320: 1313: 1310: 1273:Excavator-based 1255:Bulldozer-based 1170: 1168:Supporting CPUs 1159: 1151: 1147:XOP.LZ.09 01 /4 1146: 1139: 1131: 1127:XOP.LZ.09 01 /7 1126: 1119: 1111: 1107:XOP.LZ.09 01 /6 1106: 1099: 1091: 1087:XOP.LZ.09 01 /2 1086: 1079: 1071: 1067:XOP.LZ.09 01 /3 1066: 1059: 1051: 1047:XOP.LZ.09 02 /1 1046: 1039: 1031: 1027:XOP.LZ.09 01 /5 1026: 1019: 1011: 1007:XOP.LZ.09 02 /6 1006: 1000:x & (x + 1) 999: 991: 987:XOP.LZ.09 01 /1 986: 979: 971: 966: 946:) support TBM. 935: 920: 915: 910: 905: 898: 893: 888: 883: 857: 853: 844: 840: 835: 831: 828: 814: 809: 799: 794: 784: 779: 769: 764: 754: 749: 739: 734: 724: 719: 709: 704: 681: 672: 668: 664: 657: 653: 649: 645: 639: 638: 635: 632: 629: 626: 623: 620: 617: 614: 611: 608: 605: 602: 599: 596: 593: 590: 587: 584: 581: 578: 575: 572: 569: 566: 563: 560: 557: 554: 551: 548: 545: 542: 539: 536: 533: 530: 527: 524: 521: 518: 515: 512: 509: 506: 503: 500: 497: 494: 491: 488: 485: 482: 479: 476: 473: 470: 467: 464: 461: 458: 455: 452: 449: 446: 443: 440: 437: 434: 431: 428: 425: 422: 419: 416: 413: 410: 407: 404: 401: 398: 395: 385: 380: 374:x & (x - 1) 373: 365: 360: 353: 345: 340: 333: 325: 320: 313: 305: 300: 293: 285: 280: 245: 241: 237: 233: 230: 221: 217: 210: 206: 202: 198: 194: 181: 176: 164: 159: 139: 138:support (since 135: 131: 126:has a separate 123: 119: 115: 105: 46:microprocessors 28: 23: 22: 15: 12: 11: 5: 3057: 3055: 3047: 3046: 3041: 3031: 3030: 3024: 3023: 3019:struck through 3016: 3013: 3012: 3010: 3009: 3003: 2997: 2990: 2988: 2986:Virtualization 2982: 2981: 2979: 2978: 2973: 2966: 2964: 2958: 2957: 2955: 2954: 2948: 2942: 2936: 2930: 2924: 2918: 2912: 2905: 2903: 2896: 2895: 2893: 2892: 2887: 2882: 2876: 2874: 2868: 2867: 2865: 2864: 2858: 2851: 2849: 2843: 2842: 2840: 2839: 2833: 2827: 2821: 2815: 2809: 2803: 2797: 2791: 2783: 2777: 2771: 2765: 2759: 2753: 2747: 2740: 2738: 2727: 2726: 2724: 2723: 2722: 2721: 2711: 2710: 2709: 2699: 2698: 2697: 2687: 2686: 2685: 2680: 2675: 2670: 2660: 2659: 2658: 2653: 2643: 2642: 2641: 2630: 2628: 2617: 2616: 2608: 2606: 2605: 2598: 2591: 2583: 2574: 2573: 2571: 2570: 2564: 2562: 2558: 2557: 2555: 2554: 2549: 2544: 2539: 2534: 2529: 2524: 2519: 2514: 2509: 2504: 2499: 2494: 2489: 2484: 2479: 2478: 2477: 2467: 2462: 2457: 2452: 2447: 2442: 2436: 2434: 2430: 2429: 2427: 2426: 2421: 2416: 2411: 2406: 2401: 2396: 2390: 2388: 2384: 2383: 2381: 2380: 2375: 2370: 2365: 2360: 2355: 2350: 2345: 2340: 2335: 2330: 2325: 2320: 2314: 2312: 2308: 2307: 2301: 2299: 2298: 2291: 2284: 2276: 2267: 2266: 2264: 2263: 2258: 2253: 2248: 2247: 2246: 2241: 2236: 2226: 2225: 2224: 2219: 2209: 2204: 2199: 2194: 2189: 2183: 2181: 2177: 2176: 2174: 2173: 2172: 2171: 2161: 2156: 2151: 2146: 2141: 2136: 2131: 2126: 2121: 2115: 2113: 2109: 2108: 2105: 2104: 2102: 2101: 2096: 2091: 2085: 2083: 2079: 2078: 2076: 2075: 2070: 2064: 2062: 2055: 2051: 2050: 2048: 2047: 2042: 2037: 2032: 2027: 2021: 2019: 2015: 2014: 2008: 2006: 2005: 1998: 1991: 1983: 1977: 1976: 1969: 1968:External links 1966: 1965: 1964: 1958: 1947:Addison Wesley 1945:(2 ed.). 1934: 1931: 1929: 1928: 1907: 1880: 1860: 1837: 1817: 1793: 1769: 1746: 1732: 1703: 1674: 1654: 1631: 1611: 1578: 1549: 1539:. October 2013 1510: 1493:. March 2021. 1468: 1431: 1405: 1378: 1376: 1373: 1371: 1370: 1364: 1359: 1354: 1349: 1344: 1339: 1334: 1327: 1326: 1325: 1309: 1306: 1301: 1300: 1299: 1298: 1292: 1278: 1277: 1276: 1270: 1264: 1258: 1249: 1248: 1247: 1241: 1235: 1226: 1215: 1214: 1213: 1198: 1191: 1169: 1166: 1163: 1162: 1157: 1154: 1149: 1143: 1142: 1137: 1134: 1129: 1123: 1122: 1117: 1114: 1109: 1103: 1102: 1097: 1094: 1089: 1083: 1082: 1077: 1074: 1069: 1063: 1062: 1057: 1054: 1049: 1043: 1042: 1037: 1034: 1029: 1023: 1022: 1017: 1014: 1009: 1003: 1002: 997: 994: 989: 983: 982: 977: 974: 969: 963: 962: 959: 956: 953: 934: 931: 924: 923: 918: 913: 908: 902: 901: 896: 891: 886: 880: 879: 876: 873: 870: 850:gather-scatter 827: 824: 821: 820: 817: 812: 806: 805: 802: 797: 791: 790: 787: 782: 776: 775: 772: 767: 761: 760: 757: 752: 746: 745: 742: 737: 731: 730: 727: 722: 716: 715: 712: 707: 701: 700: 697: 694: 680: 677: 641: 640: 394: 391: 388: 383: 377: 376: 371: 368: 363: 357: 356: 351: 348: 343: 337: 336: 331: 328: 323: 317: 316: 311: 308: 303: 297: 296: 291: 288: 283: 277: 276: 273: 270: 267: 229: 226: 190: 189: 184: 179: 173: 172: 167: 162: 156: 155: 152: 149: 104: 101: 26: 24: 14: 13: 10: 9: 6: 4: 3: 2: 3056: 3045: 3042: 3040: 3037: 3036: 3034: 3020: 3014: 3007: 3004: 3001: 2998: 2995: 2992: 2991: 2989: 2987: 2983: 2977: 2974: 2971: 2968: 2967: 2965: 2963: 2959: 2952: 2949: 2946: 2943: 2940: 2937: 2934: 2931: 2928: 2925: 2922: 2919: 2916: 2913: 2910: 2907: 2906: 2904: 2902: 2899:Security and 2897: 2891: 2888: 2886: 2883: 2881: 2878: 2877: 2875: 2873: 2869: 2862: 2859: 2856: 2853: 2852: 2850: 2848: 2844: 2837: 2834: 2831: 2828: 2825: 2822: 2819: 2816: 2813: 2810: 2807: 2804: 2801: 2798: 2795: 2792: 2790: 2787: 2784: 2781: 2778: 2775: 2772: 2769: 2766: 2763: 2760: 2757: 2754: 2751: 2748: 2745: 2742: 2741: 2739: 2736: 2732: 2728: 2720: 2717: 2716: 2715: 2712: 2708: 2705: 2704: 2703: 2700: 2696: 2693: 2692: 2691: 2688: 2684: 2681: 2679: 2676: 2674: 2671: 2669: 2666: 2665: 2664: 2661: 2657: 2654: 2652: 2649: 2648: 2647: 2644: 2640: 2637: 2636: 2635: 2632: 2631: 2629: 2626: 2622: 2618: 2614: 2611: 2604: 2599: 2597: 2592: 2590: 2585: 2584: 2581: 2569: 2566: 2565: 2563: 2559: 2553: 2550: 2548: 2545: 2543: 2540: 2538: 2535: 2533: 2530: 2528: 2525: 2523: 2520: 2518: 2515: 2513: 2510: 2508: 2505: 2503: 2500: 2498: 2495: 2493: 2490: 2488: 2485: 2483: 2480: 2476: 2473: 2472: 2471: 2468: 2466: 2463: 2461: 2458: 2456: 2453: 2451: 2448: 2446: 2443: 2441: 2438: 2437: 2435: 2431: 2425: 2422: 2420: 2417: 2415: 2412: 2410: 2407: 2405: 2402: 2400: 2397: 2395: 2392: 2391: 2389: 2385: 2379: 2376: 2374: 2371: 2369: 2366: 2364: 2361: 2359: 2356: 2354: 2351: 2349: 2346: 2344: 2341: 2339: 2336: 2334: 2331: 2329: 2326: 2324: 2321: 2319: 2316: 2315: 2313: 2309: 2304: 2297: 2292: 2290: 2285: 2283: 2278: 2277: 2274: 2262: 2259: 2257: 2254: 2252: 2249: 2245: 2242: 2240: 2237: 2235: 2232: 2231: 2230: 2227: 2223: 2220: 2218: 2215: 2214: 2213: 2210: 2208: 2205: 2203: 2200: 2198: 2195: 2193: 2190: 2188: 2185: 2184: 2182: 2178: 2170: 2167: 2166: 2165: 2162: 2160: 2157: 2155: 2152: 2150: 2147: 2145: 2142: 2140: 2137: 2135: 2132: 2130: 2127: 2125: 2122: 2120: 2117: 2116: 2114: 2110: 2100: 2097: 2095: 2092: 2090: 2087: 2086: 2084: 2080: 2074: 2071: 2069: 2066: 2065: 2063: 2059: 2056: 2052: 2046: 2043: 2041: 2038: 2036: 2033: 2031: 2028: 2026: 2023: 2022: 2020: 2016: 2011: 2004: 1999: 1997: 1992: 1990: 1985: 1984: 1981: 1975: 1972: 1971: 1967: 1961: 1955: 1952: 1948: 1944: 1943: 1937: 1936: 1932: 1924: 1923: 1918: 1917:"zwegner/zp7" 1911: 1908: 1896: 1895: 1890: 1884: 1881: 1870: 1864: 1861: 1847: 1841: 1838: 1827: 1821: 1818: 1807: 1803: 1797: 1794: 1783: 1779: 1773: 1770: 1756: 1750: 1747: 1742: 1736: 1733: 1721: 1714: 1707: 1704: 1691: 1687: 1681: 1679: 1675: 1670: 1669: 1664: 1658: 1655: 1644: 1638: 1636: 1632: 1621: 1615: 1612: 1600: 1596: 1595:www.intel.com 1592: 1585: 1583: 1579: 1563: 1556: 1554: 1550: 1538: 1534: 1527: 1521: 1519: 1517: 1515: 1511: 1496: 1492: 1485: 1479: 1477: 1475: 1473: 1469: 1457: 1453: 1446: 1440: 1438: 1436: 1432: 1418: 1412: 1410: 1406: 1392: 1386: 1384: 1380: 1374: 1368: 1365: 1363: 1360: 1358: 1355: 1353: 1350: 1348: 1345: 1343: 1340: 1338: 1335: 1332: 1329: 1328: 1323: 1317: 1312: 1307: 1305: 1296: 1293: 1290: 1286: 1282: 1279: 1274: 1271: 1268: 1265: 1262: 1259: 1256: 1253: 1252: 1250: 1245: 1242: 1239: 1236: 1233: 1230: 1229: 1227: 1224: 1221: 1220: 1219: 1216: 1211: 1207: 1203: 1199: 1196: 1192: 1189: 1185: 1181: 1177: 1176: 1175: 1172: 1171: 1167: 1158: 1155: 1150: 1145: 1144: 1138: 1135: 1130: 1125: 1124: 1118: 1115: 1110: 1105: 1104: 1098: 1095: 1090: 1085: 1084: 1078: 1075: 1070: 1065: 1064: 1058: 1055: 1050: 1045: 1044: 1038: 1035: 1030: 1025: 1024: 1018: 1015: 1010: 1005: 1004: 998: 995: 990: 985: 984: 978: 975: 970: 965: 964: 960: 957: 954: 951: 950: 947: 945: 941: 932: 930: 919: 914: 909: 904: 903: 897: 892: 887: 882: 881: 877: 874: 872:Selector mask 871: 868: 867: 864: 861: 851: 825: 818: 813: 808: 807: 803: 798: 793: 792: 788: 783: 778: 777: 773: 768: 763: 762: 758: 753: 748: 747: 743: 738: 733: 732: 728: 723: 718: 717: 713: 708: 703: 702: 698: 695: 692: 691: 688: 686: 678: 676: 661: 392: 389: 384: 379: 378: 372: 369: 364: 359: 358: 352: 349: 344: 339: 338: 332: 329: 324: 319: 318: 312: 309: 304: 299: 298: 292: 289: 284: 279: 278: 274: 271: 268: 265: 264: 261: 259: 255: 251: 227: 225: 214: 188: 185: 180: 175: 174: 171: 168: 163: 158: 157: 153: 150: 147: 146: 143: 129: 112: 110: 102: 100: 98: 94: 90: 86: 82: 78: 74: 69: 67: 63: 59: 55: 51: 47: 43: 40: 36: 32: 19: 3018: 2901:cryptography 2788: 2475:AMT versions 2387:Discontinued 2180:Instructions 2119:Cool'n'Quiet 1940: 1920: 1910: 1899:. Retrieved 1892: 1883: 1872:. Retrieved 1863: 1852:. Retrieved 1840: 1829:. Retrieved 1820: 1809:. Retrieved 1805: 1796: 1785:. Retrieved 1781: 1772: 1761:. Retrieved 1749: 1735: 1724:. Retrieved 1719: 1706: 1696:November 24, 1694:. Retrieved 1690:the original 1666: 1657: 1646:. Retrieved 1623:. Retrieved 1614: 1602:. Retrieved 1594: 1569:. Retrieved 1541:. Retrieved 1532: 1502:. Retrieved 1460:. Retrieved 1451: 1423:. Retrieved 1397:. Retrieved 1302: 1238:Jaguar-based 1232:Bobcat-based 1184:Sandy Bridge 958:Description 955:Instruction 936: 927: 878:Destination 862: 829: 699:Description 696:Instruction 682: 662: 644: 272:Description 269:Instruction 231: 215: 193: 154:Description 151:Instruction 113: 108: 106: 88: 76: 70: 34: 30: 29: 2885:MIPS16e ASE 2547:Thunderbolt 1604:11 December 1571:11 December 1458:. June 2011 1289:Zen 2-based 1060:x ^ (x + 1) 869:Instruction 381:F3 0F BC /r 354:x ^ (x - 1) 177:F3 0F BD /r 160:F3 0F B8 /r 3033:Categories 2613:extensions 2414:Intel Play 2353:Skulltrail 2323:Centrino 2 2305:technology 2207:CVT16/F16C 2154:AMD Wraith 2144:Turbo Core 2112:Technology 2045:Xilinx ISE 2012:technology 1901:2020-02-07 1874:2021-12-26 1854:2014-01-03 1831:2014-03-17 1811:2022-02-21 1787:2022-07-22 1763:2023-09-09 1726:2014-02-10 1648:2014-03-17 1625:2014-03-17 1543:2014-01-02 1504:2021-04-08 1462:2014-01-03 1425:2022-07-20 1399:2014-01-03 1375:References 1285:Zen+-based 1244:Puma-based 1195:Silvermont 1188:Ivy Bridge 944:Alder Lake 940:Piledriver 921:0x12005670 916:0x00012567 911:0xff00fff0 899:0x00012567 894:0x12345678 889:0xff00fff0 660:is equal. 618:0x55555555 573:0x33333333 528:0x0F0F0F0F 483:0x00FF00FF 438:0x0000FFFF 334:x & -x 294:~x & y 254:Piledriver 211:0x000f0000 93:Piledriver 2702:Power ISA 2683:MIPS SIMD 2522:Omni-Path 2502:SpeedStep 2348:Ultrabook 2311:Platforms 2139:PowerTune 2134:PowerPlay 2129:PowerNow! 2054:Platforms 1452:intel.com 1357:Intel ADX 1281:Zen-based 1223:K10-based 1210:Broadwell 952:Encoding 693:Encoding 685:Excavator 266:Encoding 148:Encoding 66:registers 3008:(AMD-Vi) 2561:Upcoming 2318:Centrino 2169:Ryzen AI 2082:Obsolete 2018:Software 1495:Archived 1308:See also 663:As with 35:BMI sets 2909:PadLock 2824:AVX-512 2690:PA-RISC 2673:MIPS-3D 2433:Current 2363:Galileo 2073:GPUOpen 2061:Current 1806:Twitter 1533:amd.com 1206:Skylake 1202:Haswell 1180:Nehalem 1092:BLSFILL 992:BLCFILL 258:Haswell 73:Haswell 3002:(2006) 2996:(2005) 2972:(2013) 2953:(2021) 2947:(2015) 2941:(2015) 2935:(2013) 2929:(2012) 2927:RDRAND 2923:(2010) 2915:AES-NI 2911:(2003) 2863:(2014) 2838:(2023) 2832:(2022) 2826:(2015) 2820:(2013) 2808:(2009) 2802:(2009) 2796:(2008) 2789:(2007) 2782:(2006) 2776:(2006) 2770:(2004) 2764:(2001) 2758:(1999) 2752:(1998) 2750:3DNow! 2746:(1996) 2368:Edison 2338:Tablet 2192:3DNow! 2187:X86-64 2159:Virtex 2094:Dragon 2089:Spider 2040:Vivado 2030:AMDGPU 1956:  1922:GitHub 1668:GitHub 1287:, and 1200:Intel 1193:Intel 1178:Intel 1132:T1MSKC 1052:BLCMSK 875:Source 346:BLSMSK 250:Jaguar 165:POPCNT 124:POPCNT 116:POPCNT 85:SSE4.2 3000:AMD-V 2921:CLMUL 2880:Thumb 2836:AVX10 2774:SSSE3 2714:SPARC 2634:Alpha 2424:MMC-2 2419:MMC-1 2373:Curie 2303:Intel 2099:Horus 2025:AGESA 1849:(PDF) 1758:(PDF) 1716:(PDF) 1599:Intel 1565:(PDF) 1529:(PDF) 1498:(PDF) 1487:(PDF) 1456:Intel 1448:(PDF) 1420:(PDF) 1394:(PDF) 1333:(AVX) 1295:Zen 3 1174:Intel 1152:TZMSK 1112:BLSIC 1032:BLCIC 972:BEXTR 669:TZCNT 665:LZCNT 654:TZCNT 646:TZCNT 615:& 603:& 570:& 558:& 525:& 513:& 480:& 468:& 435:& 423:& 386:TZCNT 306:BEXTR 242:LZCNT 238:LZCNT 218:LZCNT 203:LZCNT 195:LZCNT 182:LZCNT 140:LZCNT 136:LZCNT 128:CPUID 120:LZCNT 81:SSE4a 50:Intel 48:from 3006:VT-d 2994:VT-x 2818:AVX2 2800:F16C 2786:SSE5 2780:SSE4 2768:SSE3 2762:SSE2 2731:SIMD 2668:MDMX 2663:MIPS 2651:NEON 2625:RISC 2621:SIMD 2455:vPro 2445:CNVi 2343:CULV 2328:Viiv 2251:SSE5 2239:BMI1 2222:FMA3 2217:FMA4 2164:XDNA 2149:ASTC 2068:ROCm 1954:ISBN 1698:2013 1606:2014 1573:2014 1347:F16C 1072:BLCS 1012:BLCI 906:PDEP 884:PEXT 858:PEXT 856:and 854:PDEP 845:PDEP 841:PEXT 836:PEXT 834:and 832:PDEP 830:The 815:SHLX 800:SHRX 785:SARX 770:RORX 755:PEXT 740:PDEP 725:MULX 710:BZHI 656:and 366:BLSR 326:BLSI 286:ANDN 205:and 62:SIMD 52:and 44:for 2976:ASF 2970:TSX 2951:TDX 2945:SGX 2939:MPX 2933:SHA 2890:RVC 2861:ADX 2855:BMI 2830:AMX 2812:FMA 2806:XOP 2794:AVX 2756:SSE 2744:MMX 2735:x86 2719:VIS 2707:VMX 2695:MAX 2678:MXU 2656:SVE 2646:ARM 2639:MVI 2378:Evo 2358:NUC 2333:MID 2261:AES 2256:ASF 2244:TBM 2234:ABM 2229:BMI 2212:FMA 2202:XOP 2197:AVX 2010:AMD 1537:AMD 1491:AMD 1218:AMD 673:BSF 658:BSF 650:BSF 597:((( 552:((( 507:((( 462:((( 417:((( 246:ABM 234:BMI 222:BSR 207:BSR 199:BSR 132:ABM 97:Zen 54:AMD 39:x86 3035:: 1949:- 1919:. 1891:. 1804:. 1780:. 1718:. 1677:^ 1665:. 1634:^ 1597:. 1593:. 1581:^ 1552:^ 1535:. 1531:. 1513:^ 1471:^ 1454:. 1450:. 1434:^ 1408:^ 1382:^ 1283:, 1208:, 1186:, 447:16 396:31 252:, 68:. 3021:. 2737:) 2733:( 2627:) 2623:( 2602:e 2595:t 2588:v 2295:e 2288:t 2281:v 2002:e 1995:t 1988:v 1962:. 1925:. 1904:. 1877:. 1857:. 1834:. 1814:. 1790:. 1766:. 1743:. 1729:. 1700:. 1651:. 1628:. 1608:. 1575:. 1546:. 1507:. 1465:. 1428:. 1402:. 636:) 633:0 630:: 627:1 624:? 621:) 612:) 609:x 606:- 600:x 594:- 591:) 588:0 585:: 582:2 579:? 576:) 567:) 564:x 561:- 555:x 549:- 546:) 543:0 540:: 537:4 534:? 531:) 522:) 519:x 516:- 510:x 504:- 501:) 498:0 495:: 492:8 489:? 486:) 477:) 474:x 471:- 465:x 459:- 456:) 453:0 450:: 444:? 441:) 432:) 429:x 426:- 420:x 414:- 411:) 408:x 405:! 402:( 399:+ 33:( 20:)

Index

Advanced Bit Manipulation
x86
instruction set architecture
microprocessors
Intel
AMD
bit manipulation
SIMD
registers
Haswell
SSE4a
SSE4.2
Piledriver
Zen
CPUID
Population count
Leading zeros count
Jaguar
Piledriver
Haswell
Excavator
gather-scatter
Piledriver
Alder Lake
Intel
Nehalem
Sandy Bridge
Ivy Bridge
Silvermont
Haswell

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.