From RAD Studio API Documentation
Jump to: navigation, search


TestSSE: Cardinal;        { 0: no SSE, 1st bit: SSE available, 2nd bit: SSE2 available }


extern DELPHI_PACKAGE unsigned TestSSE;


Type Visibility Source Unit Parent
variable public
System System


TestSSE represents the SSE (Streaming SIMD Extensions) functionality on the computer in use.

TestSSE can have a combination of the following values:

  • 0 - no SSE. The CPU doesn’t have SSE functionality.
  • 1 - only SSE functionality is available.
  • 2 - SSE2 is available.

Tip: The System unit only checks SSE and SSE2 availability. To detect SSE3 and latest SSE functionalities, add the System.Math unit to the uses section of your source code.

The System.Math unit resets the TestSSE variable to the combination of the flags below. The System.Math unit defines the following CPU constants:

  seSSE = $0001;       { SSE instruction set is available }
  seSSE2 = $0002;      { SSE2 instruction set is available }
  seSSE3 = $0004;      { SSE3 instruction set is available }
  seSSSE3 = $0008;     { Supplemental SSE3 instruction set is available }
  seSSE41 = $0010;     { SSE4.1 instruction set is available }
  seSSE42 = $0020;     { SSE4.2 instruction set is available }
  sePOPCNT = $0040;    { POPCNT instruction is available }
  seAESNI = $0080;     { AES instruction set is available }
  sePCLMULQDQ = $0100; { PCLMULQDQ instruction is available }

Note: All of X64 architecture CPUs have SSE and SSE2 functionality at least.

See Also