Saltar para o conteúdo

Streaming SIMD Extensions

Origem: Wikipédia, a enciclopédia livre.
Processador Intel Pentium 4

SSE (Streaming SIMD Extensions, inicialmente chamado de ISSE, Internet Streaming SIMD Extensions) é um SIMD (Single Instruction, Multiple Data) conjuntos de instruções desenvolvido pela Intel e introduzido no mercado em 1999 no processador Pentium III como resposta à tecnologia 3DNow! da AMD (que foi lançada um ano antes). O SSE trazia 70 novas instruções.

Ele foi originalmente conhecido como KNI (Katmai era o apelido para o primeiro Pentium III (com núcleo revisto). Durante o projeto Katmai a Intel procurava distingui-lo da sua linha anterior de produtos, particularmente do projeto Pentium II. A AMD rapidamente aproveitou do projeto da Intel e adicionou suporte às instruções SSEs, começando assim a era do famoso processador Athlon XP.

A Intel desapontou-se com seu primeiro esforço de desenvolvimento SIMD o IA-32 e o MMX. MMX possuía dois grandes problemas: ele re-utilizava pontos de flutuação registrados, fazendo com que a CPU ficasse impossibilitada de trabalhar em ambos Ponto de flutuação e instruções SIMD ao mesmo tempo, só funcionava com instruções simples.

O SSE adiciona oito novos registros 128-bits, conhecidos como XMM0 até XMM7. Cada registro pode armazenar quatro números 32-bit de ponto de flutuação ao mesmo tempo (single-precision).

Because these 128-bit registers are additional program states that the operating system must preserve across task switches, they are disabled by default until the operating system explicitly enables them. This means that the OS must know how to use the FXSAVE and FXRSTR instructions, which is the extended pair of instructions which can save all x87 and SSE register states all at once. This support was quickly added to all major IA-32 operating systems.

Because SSE adds floating point support, it sees much more use than MMX now that the graphics cards all handle integer calculations internally. Integer SIMD operations may still be performed with the eight 64-bit MMX registers. The MMX registers are "aliased" on top of the eight FPU registers. Later, Intel augmented SSE with the SSE2 instruction set, which added support for integer math. While redundant, MMX operations can be executed in parallel with SSE operations; offering great performance in limited situations.

O primeiro CPU a ter suporte ao SSE, o Pentium III, compartilhava recursos entre o SSE e o FPU. Enquanto aplicações eram compiladas de forma a utilizar instruções FPU e SSE lado a lado, os processadores Pentium III não eram capazes de operar estes dois tipos de instruções simultaneamente (num mesmo ciclo). Estas limitações reduziram a eficiência do chamado pipelining, embora os registros isolados XMM permitiam instruções SIMD e operações de ponto de flutuação escalares serem misturadas mas não tão eficientes quanto o modo MMX/floating point.

Versões posteriores

  • SSE2 foi introduzida com os processadores Pentium 4, e trouxeram melhorias significativas ao SSE (que alguns programadores passaram a chamar de "SSE1"). SSE2 adds new math instructions for double-precision (64-bit) floating point and 8/16/32-bit integer data types, all operating on the same 128-bit XMM vector register-file previously introduced with SSE. SSE2 enables the programmer to perform SIMD math of virtually any type (from 8-bit integer to 64-bit float) entirely with the XMM vector-register file, without the need to touch the (legacy) MMX/FPU registers. Many programmers consider SSE2 to be "everything SSE should have been", as SSE2 offers an orthogonal set of instructions for dealing with common datatypes.
  • SSE3 called Prescott New Instructions, is an incremental upgrade to SSE2, adding a handful of DSP-oriented math instructions and some process (thread) management instructions.
  • SSSE3 is an incremental upgrade to SSE3, adding 16 new opcodes which include permuting the bytes in a word, multiplying 16-bit fixed-point numbers with correct rounding, and within-word accumulate instructions.
  • SSE4 é uma melhoria do padrão antecessor e adiciona um ponto de instrução do produto, diversas instruções adicionais (do tipo integer), uma instrução do tipo popcnt, entre outras.