System.SetMXCSR

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

procedure SetMXCSR(NewMXCSR: UInt32);

C++

extern DELPHI_PACKAGE void __fastcall SetMXCSR(unsigned NewMXCSR);

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.pas
System.hpp
System System

Description

Sets the MXCSR register in the SSE.

SetMXCSR writes the MXCSR (control and status register) with the specified value. Setting this register to an invalid value can cause unpredictable behavior. For more information about the MXCSR register, see x87 and SSE Floating Point Assists in IA-32: Flush-To-Zero (FTZ) and Denormals-Are-Zero (DAZ) and Intel® 64 and IA-32 Architectures Developer's Manual: Vol. 1.

Note: To change the exception mode, the rounding mode, and the precision for floating-point numbers, we recommend that you use System.Math.SetExceptionMask, System.Math.SetRoundMode, and System.Math.SetPrecisionMode instead of System.Set8087CW or SetMXCSR.

On 64-bit Windows: The MXCSR register controls the rounding mode, and whether certain floating-point operations trigger exceptions.

On 32-bit Windows: The MXCSR register does not control floating-point operations, because the FPU register is used for floating point instead of the SSE register. However the SSE is still present in 32-bit mode, and SetMXCSR sets the value of the MXCSR, as in 64-bit mode.

On iOS/Simulator: SetMXCSR does not change the mask bits for the MXCSR exception. These mask bits always have the value 1.

See Also

Code Examples