다음을 통해 공유


Task Switching

Microsoft Specific

With respect to task switching, treat the 3DNow! instructions exactly the same as MMX instructions. Operating system design must be taken into account when writing a 3DNow! program.

The programmer must know whether the operating system automatically saves the current states when task switching, or if the 3DNow! program has to provide the code to save states. All of the Microsoft 32-bit and 64-bit operating systems save the current state when task switching.

If a task switch occurs, the control register (CR0) task switch (TS) bit is set to 1. The processor then generates an interrupt 7 (int 7 — Device Not Available) when it encounters the next floating-point, 3DNow!, or MMX instruction, allowing the operating system to save the state of the 3DNow!, MMX, and FP registers.

In a multitasking operating system, if there is a task switch when 3DNow!/MMX applications are running with older applications that do not include MMX instructions, the MMX/FP register state is still saved automatically through the int 7 handler.

See Also

Concepts

AMD 3DNow! Technology Overview and Intrinsics