Volume 5 64-Bit Media and x87 Floating-Point Instructions (794099), страница 36
Текст из файла (страница 36)
Unaffected flags are blank. Undefined flags are U.Instruction ReferenceFLD263AMD64 Technology26569—Rev. 3.08—July 2007ExceptionsVirtual8086 ProtectedExceptionRealCause of ExceptionDevice not available,#NMXXXThe emulate bit (EM) or the task switch bit (TS) of thecontrol register (CR0) was set to 1.Stack, #SSXXXA memory address exceeded the stack segment limit orwas non-canonical.General protection,#GPXXXA memory address exceeded a data segment limit or wasnon-canonical.XA null data segment was used to reference memory.Page fault, #PFXXA page fault resulted from the execution of the instruction.Alignment check,#ACXXAn unaligned memory reference was performed whilealignment checking was enabled.XXAn unmasked x87 floating-point exception was pending.x87 floating-pointexception pending,#MFXx87 Floating-Point Exception Generated, #MFInvalid-operationexception (IE)XXXA source operand was an SNaN value.XXXA source operand was in an unsupported format.Invalid-operationexception (IE) withstack fault (SF)XXXAn x87 stack underflow occurred.XXXAn x87 stack overflow occurred.XXXA source operand was a denormal value.
This exceptiondoes not occur if the source operand was in doubleextended-precision format.Denormalizedoperand exception(DE)264FLDInstruction Reference26569—Rev. 3.08—July 2007AMD64 TechnologyFLD1Floating-Point Load +1.0Pushes the floating-point value +1.0 onto the register stack.MnemonicOpcodeFLD1DescriptionD9 E8Push +1.0 onto the x87 register stack.Related InstructionsFLD, FLDZ, FLDPI, FLDL2T, FLDL2E, FLDLG2, FLDLN2rFLAGS AffectedNonex87 Condition Codex87 Condition CodeValueC0UDescription0No x87 stack fault occurred.1x87 stack overflow, if an x87 register stack fault was detected.C1C2UC3UNote: A flag set to 1 or cleared to 0 is M (modified).
Unaffected flags are blank. Undefined flags are U.ExceptionsVirtual8086 ProtectedExceptionRealCause of ExceptionDevice not available,#NMXXXThe emulate bit (EM) or the task switch bit (TS) of thecontrol register (CR0) is set to 1.x87 floating-pointexception pending,#MFXXXAn unmasked x87 floating-point exception was pending.x87 Floating-Point Exception Generated, #MFInvalid-operationexception (IE) withstack fault (SF)XInstruction ReferenceXXAn x87 stack overflow occurred.FLD1265AMD64 Technology26569—Rev. 3.08—July 2007FLDCWFloating-Point Load x87 Control WordLoads a 16-bit value from the specified memory location into the x87 control word.
If the new x87control word unmasks any pending floating point exceptions, then they are handled upon execution ofthe next x87 floating-point or 64-bit media instruction.To avoid generating exceptions when loading a new control word, use the FCLEX or FNCLEXinstruction to clear any pending exceptions.MnemonicFLDCW mem2envOpcodeD9 /5DescriptionLoad the contents of mem2env into the x87 control word.Related InstructionsFSTCW, FNSTCW, FSTSW, FNSTSW, FSTENV, FNSTENV, FLDENV, FCLEX, FNCLEXrFLAGS AffectedNonex87 Condition Codex87 Condition CodeValueC0UC1UC2UC3UDescriptionNote: A flag set to 1 or cleared to 0 is M (modified). Unaffected flags are blank.
Undefined flags are U.266FLDCWInstruction Reference26569—Rev. 3.08—July 2007AMD64 TechnologyExceptionsVirtual8086 ProtectedExceptionRealCause of ExceptionDevice not available,#NMXXXThe emulate bit (EM) or the task switch bit (TS) of thecontrol register (CR0) was set to 1.Stack, #SSXXXA memory address exceeded the stack segment limit or wasnon-canonical.General protection,#GPXXXA memory address exceeded a data segment limit or wasnon-canonical.XA null data segment was used to reference memory.Page fault, #PFXXA page fault resulted from the execution of the instruction.Alignment check,#ACXXAn unaligned memory reference was performed whilealignment checking was enabled.XXAn unmasked x87 floating-point exception was pending.x87 floating-pointexception pending,#MFXInstruction ReferenceFLDCW267AMD64 Technology26569—Rev.
3.08—July 2007FLDENVFloating-Point Load x87 EnvironmentRestores the x87 environment from memory starting at the specified address. The x87 environmentconsists of the x87 control, status, and tag word registers, the last non-control x87 instruction pointer,the last x87 data pointer, and the opcode of the last completed non-control x87 instruction.The FLDENV instruction takes a memory operand that specifies the starting address of either a 14byte or 28-byte area in memory. The 14-byte operand is required for a 16-bit operand-size; the 28-bytememory area is required for both 32-bit and 64-bit operand sizes. The layout of the saved x87environment within the specified memory area depends on whether the processor is operating inprotected or real mode. See “Media and x87 Processor State” in Volume 2 for details on how thisinstruction loads the x87 environment from memory. (Because FSTENV does not save the full 64-bitdata and instruction pointers, 64-bit applications should use FXSAVE/FXRSTOR, rather thanFSTENV/FLDENV.)The environment to be loaded is typically stored by a previous FNSTENV or FSTENV instruction.The FLDENV instruction should be executed in the same operating mode as the instruction that storedthe x87 environment.If FLDENV results in set exception flags in the loaded x87 status word register, and these exceptionsare unmasked in the x87 control word register, a floating-point exception occurs when the nextfloating-point instruction is executed (except for the no-wait floating-point instructions).To avoid generating exceptions when loading a new environment, use the FCLEX or FNCLEXinstruction to clear the exception flags in the x87 status word before storing that environment.MnemonicFLDENVmem14/28envOpcodeD9 /4DescriptionLoad the complete contents of the x87 environment frommem14/28env.Related InstructionsFSTENV, FNSTENV, FCLEX, FNCLEXrFLAGS AffectedNone268FLDENVInstruction Reference26569—Rev.
3.08—July 2007AMD64 Technologyx87 Condition Codex87 Condition CodeValueDescriptionC0MLoaded from memory.C1MLoaded from memory.C2MLoaded from memory.C3MLoaded from memory.Note: A flag set to 1 or cleared to 0 is M (modified). Unaffected flags are blank. Undefined flags are U.ExceptionsVirtual8086 ProtectedExceptionRealCause of ExceptionDevice not available,#NMXXXThe emulate bit (EM) or the task switch bit (TS) of thecontrol register (CR0) was set to 1.Stack, #SSXXXA memory address exceeded the stack segment limit orwas non-canonical.General protection,#GPXXXA memory address exceeded a data segment limit or wasnon-canonical.XA null data segment was used to reference memory.Page fault, #PFXXA page fault resulted from the execution of the instruction.Alignment check,#ACXXAn unaligned memory reference was performed whilealignment checking was enabled.XXAn unmasked x87 floating-point exception was pending.x87 floating-pointexception pending,#MFXInstruction ReferenceFLDENV269AMD64 Technology26569—Rev.
3.08—July 2007FLDL2EFloating-Point Load Log2 ePushes log2e onto the x87 register stack. The value in ST(0) is the result, in double-extended-precisionformat, of rounding an internal 66-bit constant according to the setting of the RC field in the x87control word register.MnemonicOpcodeFLDL2ED9 EADescriptionPush log2e onto the x87 register stack.Related InstructionsFLD, FLD1, FLDZ, FLDPI, FLDL2T, FLDLG2, FLDLN2rFLAGS AffectedNonex87 Condition Codex87 Condition CodeValueC0UDescription0No x87 stack fault occurred.1x87 stack overflow, if an x87 register stack fault was detected.C1C2UC3UNote: A flag set to 1 or cleared to 0 is M (modified). Unaffected flags are blank. Undefined flags are U.ExceptionsVirtual8086 ProtectedExceptionRealCause of ExceptionDevice not available,#NMXXXThe emulate bit (EM) or the task switch bit (TS) of thecontrol register (CR0) was set to 1.x87 floating-pointexception pending,#MFXXXAn unmasked x87 floating-point exception was pending.x87 Floating-Point Exception Generated, #MFInvalid-operationexception (IE) withstack fault (SF)270XXXAn x87 stack overflow occurred.FLDL2EInstruction Reference26569—Rev.
3.08—July 2007AMD64 TechnologyFLDL2TFloating-Point Load Log2 10Pushes log2 10 onto the x87 register stack. The value in ST(0) is the result, in double-extendedprecision format, of rounding an internal 66-bit constant according to the setting of the RC field in thex87 control word register.MnemonicOpcodeFLDL2TD9 E9DescriptionPush log210 onto the x87 register stack.Related InstructionsFLD, FLD1, FLDZ, FLDPI, FLDL2E, FLDLG2, FLDLN2rFLAGS AffectedNonex87 Condition Codex87 Condition CodeValueC0UDescription0No x87 stack fault occurred.1x87 stack overflow, if an x87 register stack fault was detected.C1C2UC3UNote: A flag set to 1 or cleared to 0 is M (modified). Unaffected flags are blank. Undefined flags are U.ExceptionsVirtual8086 ProtectedExceptionRealCause of ExceptionDevice not available,#NMXXXThe emulate bit (EM) or the task switch bit (TS) of thecontrol register (CR0) was set to 1.x87 floating-pointexception pending,#MFXXXAn unmasked x87 floating-point exception was pending.x87 Floating-Point Exception Generated, #MFInvalid-operationexception (IE) withstack fault (SF)XInstruction ReferenceXXAn x87 stack overflow occurred.FLDL2T271AMD64 Technology26569—Rev.
3.08—July 2007FLDLG2Floating-Point Load Log10 2Pushes log10 2 onto the x87 register stack. The value in ST(0) is the result, in double-extendedprecision format, of rounding an internal 66-bit constant according to the setting of the RC field in thex87 control word register.MnemonicOpcodeFLDLG2D9 ECDescriptionPush log102 onto the x87 register stack.Related InstructionsFLD, FLD1, FLDZ, FLDPI, FLDL2T, FLDL2E, FLDLN2rFLAGS AffectedNonex87 Condition Codex87 Condition CodeValueC0UDescription0No x87 stack fault occurred.1x87 stack overflow, if an x87 register stack fault was detected.C1C2UC3UNote: A flag set to 1 or cleared to 0 is M (modified). Unaffected flags are blank.
Undefined flags are U.ExceptionsVirtual8086 ProtectedExceptionRealCause of ExceptionDevice not available,#NMXXXThe emulate bit (EM) or the task switch bit (TS) of thecontrol register (CR0) was set to 1.x87 floating-pointexception pending,#MFXXXAn unmasked x87 floating-point exception was pending.x87 Floating-Point Exception Generated, #MFInvalid-operationexception (IE) withstack fault (SF)272XXXAn x87 stack overflow occurred.FLDLG2Instruction Reference26569—Rev.
3.08—July 2007AMD64 TechnologyFLDLN2Floating-Point Load Ln 2Pushes loge2 onto the x87 register stack. The value in ST(0) is the result, in double-extended-precisionformat, of rounding an internal 66-bit constant according to the setting of the RC field in the x87control word register.MnemonicOpcodeFLDLN2D9 EDDescriptionPush loge2 onto the x87 register stack.Related InstructionsFLD, FLD1, FLDZ, FLDPI, FLDL2T, FLDL2E, FLDLG2rFLAGS AffectedNonex87 Condition Codex87 Condition CodeValueC0UDescription0No x87 stack fault occurred.1x87 stack overflow, if an x87 register stack fault was detected.C1C2UC3UNote: A flag set to 1 or cleared to 0 is M (modified).