SSE4

SSE4 (Streaming SIMD Extensions 4) is a SIMD CPU instruction set used in the Intel Core microarchitecture and AMD K10 (K8L). It was announced on September 27, 2006, at the Fall 2006 Intel Developer Forum, with vague details in a white paper; more precise details of 47 instructions became available at the Spring 2007 Intel Developer Forum in Beijing, in the presentation. SSE4 extended the SSE3 instruction set which was released in early 2004. All software using previous Intel SIMD instructions (ex. SSE3) are compatible with modern microprocessors supporting SSE4 instructions. All existing software continues to run correctly without modification on microprocessors that incorporate SSE4, as well as in the presence of existing and new applications that incorporate SSE4.

Like other previous generation CPU SIMD instruction sets, SSE4 supports up to 16 registers, each 128-bits wide which can load four 32-bit integers, four 32-bit single precision floating point numbers, or two 64-bit double precision floating point numbers. SIMD operations, such as vector element-wise addition/multiplication and vector scalar addition/multiplication, process multiple bytes of data in a single CPU instruction. The parallel operation packs noticeable increases in performance. SSE4.2 introduced new SIMD string operations, including an instruction to compare two string fragments of up to 16 bytes each. SSE4.2 is a subset of SSE4 and it was released a few years after the initial release of SSE4.

SSE4 subsets
Intel SSE4 consists of 54 instructions. A subset consisting of 47 instructions, referred to as SSE4.1 in some Intel documentation, is available in Penryn. Additionally, SSE4.2, a second subset consisting of the seven remaining instructions, is first available in Nehalem-based Core i7. Intel credits feedback from developers as playing an important role in the development of the instruction set.

Starting with Barcelona-based processors, AMD introduced the SSE4a instruction set, which has four SSE4 instructions and four new SSE instructions. These instructions are not found in Intel's processors supporting SSE4.1 and AMD processors only started supporting Intel's SSE4.1 and SSE4.2 (the full SSE4 instruction set) in the Bulldozer-based FX processors. With SSE4a the misaligned SSE feature was also introduced which meant unaligned load instructions were as fast as aligned versions on aligned addresses. It also allowed disabling the alignment check on non-load SSE operations accessing memory. Intel later introduced similar speed improvements to unaligned SSE in their Nehalem processors, but did not introduce misaligned access by non-load SSE instructions until AVX.

Name confusion
What is now known as SSSE3 (Supplemental Streaming SIMD Extensions 3), introduced in the Intel Core 2 processor line, was referred to as SSE4 by some media until Intel came up with the SSSE3 moniker. Internally dubbed Merom New Instructions, Intel originally did not plan to assign a special name to them, which was criticized by some journalists. Intel eventually cleared up the confusion and reserved the SSE4 name for their next instruction set extension.

Intel is using the marketing term HD Boost to refer to SSE4.

New instructions
Unlike all previous iterations of SSE, SSE4 contains instructions that execute operations which are not specific to multimedia applications. It features a number of instructions whose action is determined by a constant field and a set of instructions that take XMM0 as an implicit third operand.

Several of these instructions are enabled by the single-cycle shuffle engine in Penryn. (Shuffle operations reorder bytes within a register.)

SSE4.1
These instructions were introduced with Penryn microarchitecture, the 45 nm shrink of Intel's Core microarchitecture. Support is indicated via the CPUID.01H:ECX.SSE41[Bit 19] flag.

SSE4.2
SSE4.2 added STTNI (String and Text New Instructions), several new instructions that perform character searches and comparison on two operands of 16 bytes at a time. These were designed (among other things) to speed up the parsing of XML documents. It also added a  instruction to compute cyclic redundancy checks as used in certain data transfer protocols. These instructions were first implemented in the Nehalem-based Intel Core i7 product line, and complete the SSE4 instruction set. AMD on the other hand first added support starting with the Bulldozer microarchitecture. Support is indicated via the CPUID.01H:ECX.SSE42[Bit 20] flag.

Windows 11 24H2 requires the CPU to support SSE4.2, otherwise the Windows kernel is unbootable.

and
These instructions operate on integer rather than SSE registers, because they are not SIMD instructions, but appear at the same time and although introduced by AMD with the SSE4a instruction set, they are counted as separate extensions with their own dedicated CPUID bits to indicate support. Intel implements  beginning with the Nehalem microarchitecture and   beginning with the Haswell microarchitecture. AMD implements both, beginning with the Barcelona microarchitecture.

AMD calls this pair of instructions Advanced Bit Manipulation (ABM).

The encoding of  takes the same encoding path as the encoding of the   (bit scan reverse) instruction. This results in an issue where  called on some CPUs not supporting it, such as Intel CPUs prior to Haswell, may incorrectly execute the   operation instead of raising an invalid instruction exception. This is an issue as the result values of  and   are different.

Trailing zeros can be counted using the  (bit scan forward) or   instructions.

Windows 11 24H2 requires the CPU to support, otherwise the Windows kernel is unbootable.

SSE4a
The SSE4a instruction group was introduced in AMD's Barcelona microarchitecture. These instructions are not available in Intel processors. Support is indicated via the CPUID.80000001H:ECX.SSE4A[Bit 6] flag.

Supporting CPUs

 * Intel
 * Silvermont processors (SSE4.1, SSE4.2 and  supported)
 * Goldmont processors (SSE4.1, SSE4.2 and  supported)
 * Goldmont Plus processors (SSE4.1, SSE4.2 and  supported)
 * Tremont processors (SSE4.1, SSE4.2 and  supported)
 * Penryn processors (SSE4.1 supported, except Pentium Dual-Core and Celeron)
 * Nehalem processors and Westmere processors (SSE4.1, SSE4.2 and  supported, except Pentium and Celeron)
 * Sandy Bridge processors and newer (SSE4.1, SSE4.2 and  supported, include Pentium and Celeron)
 * Haswell processors and newer (SSE4.1, SSE4.2,  and   supported)
 * AMD
 * K10-based processors (SSE4a,  and   supported)
 * "Cat" low-power processors
 * Bobcat-based processors (SSE4a,  and   supported)
 * Jaguar-based processors and newer (SSE4a, SSE4.1, SSE4.2,  and   supported)
 * Puma-based processors and newer (SSE4a, SSE4.1, SSE4.2,  and   supported)
 * "Heavy Equipment" processors (SSE4a, SSE4.1, SSE4.2,  and   supported)
 * Bulldozer-based processors
 * Piledriver-based processors
 * Steamroller-based processors
 * Excavator-based processors and newer
 * Zen-based processors (SSE4a, SSE4.1, SSE4.2,  and   supported)
 * Zen+-based processors (SSE4a, SSE4.1, SSE4.2,  and   supported)
 * Zen2-based processors (SSE4a, SSE4.1, SSE4.2,  and   supported)
 * Zen3-based processors (SSE4a, SSE4.1, SSE4.2,  and   supported)
 * Zen4-based processors (SSE4a, SSE4.1, SSE4.2,  and   supported)
 * VIA
 * Nano 3000, X2, QuadCore processors (SSE4.1 supported)
 * Nano QuadCore C4000-series processors (SSE4.1, SSE4.2 supported)
 * Eden X4 processors (SSE4.1, SSE4.2 supported)
 * Zhaoxin
 * ZX-C processors and newer (SSE4.1, SSE4.2 supported)