Главная » Просмотр файлов » Volume 5 64-Bit Media and x87 Floating-Point Instructions

Volume 5 64-Bit Media and x87 Floating-Point Instructions (794099), страница 35

Файл №794099 Volume 5 64-Bit Media and x87 Floating-Point Instructions (Intel and AMD manuals) 35 страницаVolume 5 64-Bit Media and x87 Floating-Point Instructions (794099) страница 352019-04-28СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 35)

Unaffected flags are blank. Undefined flags are U.254FINCSTPInstruction Reference26569—Rev. 3.08—July 2007AMD64 TechnologyExceptionsVirtual8086 ProtectedExceptionRealDevice 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.Instruction ReferenceCause of ExceptionFINCSTP255AMD64 Technology26569—Rev.

3.08—July 2007FINITFNINITFloating-Point InitializeSets the x87 control word register, status word register, tag word register, instruction pointer, and datapointer to their default states as follows:••••Sets the x87 control word to 037Fh—round to nearest (RC = 00b); double-extended-precision (PC= 11b); all exceptions masked (PM, UM, OM, ZM, DM, and IM all set to 1).Clears all bits in the x87 status word (TOP is set to 0, which maps ST(0) onto FPR0).Marks all x87 stack registers as empty (11b) in the x87 tag register.Clears the instruction pointer and the data pointer.These instructions do not actually zero out the x87 stack registers.Assemblers usually provide an FINIT macro that expands into the instruction sequenceWAITFNINIT destination; Opcode 9B; Opcode DB E3The WAIT (9Bh) instruction checks for pending x87 exceptions and calls an exception handler, ifnecessary.

The FNINIT instruction then resets the x87 environment to its default state.MnemonicOpcodeDescriptionFINIT9B DB E3Perform a WAIT (9B) to check for pending floating-pointexceptions and then initialize the x87 unit.FNINITDB E3Initialize the x87 unit without checking for unmaskedfloating-point exceptions.Related InstructionsFWAIT, WAITrFLAGS AffectedNone256FINIT (FNINIT)Instruction Reference26569—Rev. 3.08—July 2007AMD64 Technologyx87 Condition Codex87 Condition CodeValueC00C10C20C30DescriptionNote: A flag set to 1 or cleared to 0 is M (modified). Unaffected flags are blank. Undefined flags are U.ExceptionsExceptionRealDevice not available,#NMXInstruction ReferenceVirtual8086 ProtectedXXCause of ExceptionThe emulate bit (EM) or the task switch bit (TS) of thecontrol register (CR0) was set to 1.FINIT (FNINIT)257AMD64 Technology26569—Rev.

3.08—July 2007FISTFISTPFloating-Point Integer StoreConverts the value in ST(0) to a signed integer, rounds it if necessary, and copies it to the specifiedmemory location. The rounding control (RC) field of the x87 control word determines the type ofrounding used.The FIST instruction supports 16-bit and 32-bit values. The FISTP instructions supports 16-bit, 32-bit,and 64-bit values.The FISTP instruction pops the stack after storing the rounded value in memory.If the value is too large for the destination location, is a NaN, or is in an unsupported format, theinstruction sets the invalid-operation exception (IE) bit in the x87 status word to 1.

Then, if theexception is masked (IM bit set to 1 in the x87 control word), the instruction stores the integerindefinite value. If the exception is unmasked (IM bit cleared to 0), the instruction does not store thevalue.MnemonicOpcodeDescriptionFIST mem16intDF /2Convert the contents of ST(0) to integer and store the resultin mem16int.FIST mem32intDB /2Convert the contents of ST(0) to integer and store the resultin mem32int.FISTP mem16intDF /3Convert the contents of ST(0) to integer, store the result inmem16int, and pop the x87 register stack.FISTP mem32intDB /3Convert the contents of ST(0) to integer, store the result inmem32int, and pop the x87 register stack.FISTP mem64intDF /7Convert the contents of ST(0) to integer, store the result inmem64int, and pop the x87 register stack.Table 2-1 shows the results of storing various types of numbers as integers.Table 2-1.Storing Numbers as IntegersST(0)DEST-∞Invalid-operation (IE) exception–Finite-real < –1–Integer (Invalid-operation (IE) exception if the integer is too large for thedestination)–1 < –Finite-real< –00 or –1, depending on the rounding mode-00+00+0 < +Finite-real < +10 or +1, depending on the rounding mode258FISTxInstruction Reference26569—Rev.

3.08—July 2007Table 2-1.AMD64 TechnologyStoring Numbers as Integers (continued)ST(0)DEST+Finite-real > +1+Integer (Invalid-operation (IE) exception if the integer is too large for thedestination)+∞Invalid-operation (IE) exceptionNaNInvalid-operation (IE) exceptionRelated InstructionsFLD, FST, FSTP, FILD, FBLD, FBSTP, FISTTPrFLAGS AffectedNonex87 Condition Codex87 Condition CodeValueC0UDescription0No precision exception occurred.0x87 stack underflow, if an x87 register stack fault was detected.0Result was rounded down, if a precision exception was detected.1Result was rounded up, if a precision exception was detected.C1C2UC3UNote: A flag set to 1 or cleared to 0 is M (modified). Unaffected flags are blank.

Undefined flags are U.Instruction ReferenceFISTx259AMD64 Technology26569—Rev. 3.08—July 2007ExceptionsVirtual8086 ProtectedExceptionRealInvalid opcode, #UDXXXThe SSE3 instructions are not supported, as indicated byECX bit 0 of CPUID function 0000_0001h.Device 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.XXXA memory address exceeded a data segment limit or wasnon-canonical.XThe destination operand was in a nonwritable segment.XA null data segment was used to reference memory.General protection,#GPCause of ExceptionPage 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, #MFXXXThe source operand was too large for the destinationformat.XXXA source operand was an SNaN value, a QNaN value,+-infinity, or an unsupported format.Invalid-operationexception (IE) withstack fault (SF)XXXAn x87 stack underflow occurred.Precision exception(PE)XXXA result could not be represented exactly in the destinationformat.Invalid-operationexception (IE)260FISTxInstruction Reference26569—Rev.

3.08—July 2007FISTTPAMD64 TechnologyFloating Point Integer Truncate and StoreConverts a floating-point value in ST(0) to an integer by truncating the fractional part of the numberand storing the integer result to the memory address specified by the destination operand. FISTTP thenpops the floating point register stack. The FISTTP instruction ignores the rounding mode specified bythe x87 control word.The FISTTP instruction applies to 16-bit, 32-bit, and 64-bit operands.The FISTTP instruction is an SSE3 instruction. The presence of this instruction set is indicated by aCPUID feature bit. (See “CPUID” in Volume 3.)MnemonicOpcodeDescriptionFISTTP mem16intDF /1Store the truncated floating-point value in ST(0) inmemory location mem16int and pop the floating-pointregister stack.FISTTP mem32intDB /1Store the truncated floating-point value in ST(0) inmemory location mem32int and pop the floating-pointregister stack.FISTTP mem64intDD /1Store the truncated floating-point value in ST(0) inmemory location mem64int and pop the floating-pointregister stack.Table 2-2 shows the results of storing various types of numbers as integers.Table 2-2.

Storing Numbers as IntegersST(0)DESTINATION-∞Invalid-operation (IE) exception–Finite-real ≤ –1–Integer (Invalid-operation (IE) exception if the integer is too large for the destination)-1 < Finite-real < +10+Finite-real ≥ +1+Integer (Invalid-operation (IE) exception if the integer is too large for the destination)+∞Invalid-operation (IE) exceptionNaNInvalid-operation (IE) exceptionRelated InstructionsFLD, FST, FSTP, FILD, FBLD, FBSTP, FISTPrFLAGS AffectedNoneInstruction ReferenceFISTTP261AMD64 Technology26569—Rev.

3.08—July 2007x87 Condition Codex87 Condition CodeValue*C0UDescriptionx87 stack underflow, if an x87 register stack fault was detected.C10C2UC3UFP number is rounded down (always done since the instruction forcestruncate mode).Note: *A flag set to 1 or cleared to 0 is M (modified). Unaffected flags are blank. Undefined flags are U.ExceptionsExceptionRealVirtual8086 ProtectedCause of Exception#UDXXXThe SSE3 instructions are not supported, as indicated byECX bit 0 of CPUID function 0000_0001h.Device 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.XXXA memory address exceeded a data segment limit or wasnon-canonical.XThe destination operand was in a nonwritable segment.XA null data segment was used to reference memory.General protection,#GPPage 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, #MFXXXThe source operand was too large for the destinationformat.XXXA source operand was an SNaN value, a QNaN value,+infinity, or an unsupported format.Invalid-operationexception (IE) withstack fault (SF)XXXAn x87 stack underflow occurred.Precision exception(PE)XXXA result could not be represented exactly in the destinationformat.Invalid-operationexception (IE)262FISTTPInstruction Reference26569—Rev.

3.08—July 2007AMD64 TechnologyFLDFloating-Point LoadPushes a value in memory or in a floating-point register onto the register stack. If in memory, the valuecan be a single-precision, double-precision, or double-extended-precision floating-point value. Theoperation converts a single-precision or double-precision value to double-extended-precision formatbefore pushing it onto the stack.MnemonicOpcodeDescriptionFLD ST(i)D9 C0+iPush the contents of ST(i) onto the x87 register stack.FLD mem32realD9 /0Push the contents of mem32real onto the x87 register stack.FLD mem64realDD /0Push the contents of mem64real onto the x87 register stack.FLD mem80realDB /5Push the contents of mem80real onto the x87 register stack.Related InstructionsFFREE, FST, FSTP, FILD, FIST, FISTP, FBLD, FBSTPrFLAGS AffectedNonex87 Condition Codex87 Condition CodeValueC0UC1Description0x87 stack underflow, if an x87 register stack fault was detected.1x87 stack overflow, if an x87 register stack fault was detected.0No x87 stack fault.C2UC3UNote: A flag set to 1 or cleared to 0 is M (modified).

Характеристики

Тип файла
PDF-файл
Размер
1,38 Mb
Материал
Тип материала
Высшее учебное заведение

Список файлов книги

Свежие статьи
Популярно сейчас
А знаете ли Вы, что из года в год задания практически не меняются? Математика, преподаваемая в учебных заведениях, никак не менялась минимум 30 лет. Найдите нужный учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6510
Авторов
на СтудИзбе
302
Средний доход
с одного платного файла
Обучение Подробнее