03.03.2013 Views

Intel® Architecture Instruction Set Extensions Programming Reference

Intel® Architecture Instruction Set Extensions Programming Reference

Intel® Architecture Instruction Set Extensions Programming Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SYSTEM PROGRAMMING MODEL<br />

3.3 RESET BEHAVIOR<br />

At processor reset<br />

• YMM0-16 bits[255:0] are set to zero.<br />

• XFEATURE_ENABLED_MASK[2:1] is set to zero, XFEATURE_ENABLED_MASK[0] is set to 1.<br />

• CR4.OSXSAVE[bit 18] (and its mirror CPUID.1.ECX.OSXSAVE[bit 27]) is set to 0.<br />

3.4 EMULATION<br />

<strong>Set</strong>ting the CR0.EMbit to 1 provides a technique to emulate Legacy SSE floating-point instruction sets in software.<br />

This technique is not supported with AVX instructions, nor FMA instructions.<br />

If an operating system wishes to emulate AVX instructions, set XFEATURE_ENABLED_MASK[2:1] to zero. This will<br />

cause AVX instructions to #UD. Emulation of FMA by operating system can be done similarly as with emulating AVX<br />

instructions.<br />

3.5 WRITING AVX FLOATING-POINT EXCEPTION HANDLERS<br />

AVX and FMA floating-point exceptions are handled in an entirely analogous way to Legacy SSE floating-point<br />

exceptions. To handle unmasked SIMD floating-point exceptions, the operating system or executive must provide<br />

an exception handler. The section titled “SSE and SSE2 SIMD Floating-Point Exceptions” in Chapter 11, “<strong>Programming</strong><br />

with Streaming SIMD <strong>Extensions</strong> 2 (SSE2),” of the IA-32 <strong>Intel®</strong> <strong>Architecture</strong> Software Developer’s Manual,<br />

Volume 1, describes the SIMD floating-point exception classes and gives suggestions for writing an exception<br />

handler to handle them.<br />

To indicate that the operating system provides a handler for SIMD floating-point exceptions (#XM), the CR4.OSXM-<br />

MEXCPT flag (bit 10) must be set.<br />

§<br />

3-6 Ref. # 319433-014

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!