ia-32_volume1_basic-arch

Result in radians it is useful for converting

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: the input operands, throughout the domain supported by the instruction. The instructions FYL2X and FYL2XP1 are two operand instructions and are guaranteed to be within 1 ulp only when y equals 1. When y is not equal to 1, the maximum ulp error is always within 1.35 ulps in round to nearest mode. (For the two operand functions, monotonicity was proved by holding one of the operands constant.) 8.3.11 x87 FPU Control Instructions The following instructions control the state and modes of operation of the x87 FPU. They also allow the status of the x87 FPU to be examined: FINIT/FNINIT FLDCW FSTCW/FNSTCW FSTSW/FNSTSW FCLEX/FNCLEX FLDENV FSTENV/FNSTENV FRSTOR FSAVE/FNSAVE FINCSTP FDECSTP FFREE FNOP WAIT/FWAIT Initialize x87 FPU Load x87 FPU control word Store x87 FPU control word Store x87 FPU status word Clear x87 FPU exception flags Load x87 FPU environment Store x87 FPU environment Restore x87 FPU state Save x87 FPU state Increment x87 FPU register stack pointer Decrement x87 FPU register stack pointer Free x87 FPU register No operation Check for and handle pending unmasked x87 FPU exceptions The FINIT/FNINIT instructions initialize the x87 FPU and its internal registers to default values. The FLDCW instructions loads the x87 FPU control word register with a value from memory. The FSTCW/FNSTCW and FSTSW/FNSTSW instructions store the x87 FPU 8-32 Vol. 1 PROGRAMMING WITH THE X87 FPU control and status words, respectively, in memory (or for an FSTSW/FNSTSW instruction in a general-purpose register). The FSTENV/FNSTENV and FSAVE/FNSAVE instructions save the x87 FPU environment and state, respectively, in memory. The x87 FPU environment includes all the x87 FPU's control and status registers; the x87 FPU state includes the x87 FPU environment and the data registers in the x87 FPU register stack. (The FSAVE/FNSAVE instruction also initializes the x87 FPU to default values, like the FINIT/FNINIT instruction, after it saves the original state of the x87 FPU.) The FLDENV and FRSTOR instructions load the x87 FPU environment and state, respectively, from memory into the x87 FPU. These instructions are commonly used when switching tasks or contexts. The WAIT/FWAIT instructions are synchronization instructions. (They are actually mnemonics for the same opcode.) These instructions check the x87 FPU status word for pending unmasked x87 FPU exceptions. If any pending unmasked x87 FPU exceptions are found, they are handled before the processor resumes execution of the instructions (integer, floating-point, or system instruction) in the instruction stream. The WAIT/FWAIT instructions are provided to allow synchronization of instruction execution between the x87 FPU and the processor's integer unit. See Section 8.6, "x87 FPU Exception Synchronization," for more information on the use of the WAIT/FWAIT instructions. 8.3.12 Waiting vs. Non-waiting Instructions All of the x87 FPU instructions except a few special control instructions perform a wait operation (similar t...
View Full Document

This note was uploaded on 10/01/2013 for the course CPE 103 taught by Professor Watlins during the Winter '11 term at Mississippi State.

Ask a homework question - tutors are online