Главная » Просмотр файлов » Volume 3 General-Purpose and System Instructions

Volume 3 General-Purpose and System Instructions (794097), страница 40

Файл №794097 Volume 3 General-Purpose and System Instructions (Intel and AMD manuals) 40 страницаVolume 3 General-Purpose and System Instructions (794097) страница 402019-04-28СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

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

Like the CMOVcc instructions(page 91), the SETcc instructions can replace two instructions—a conditional jump and a move.Replacing conditional jumps with conditional sets can help avoid branch-prediction penalties that mayresult from conditional jumps.If the logical value “true” (logical one) is represented in a high-level language as an integer with all bitsset to 1, software can accomplish such representation by first executing the opposite SETccinstruction—for example, the opposite of SETZ is SETNZ—and then decrementing the result.A ModR/M byte is used to identify the operand. The reg field in the ModR/M byte is unused.MnemonicOpcodeDescriptionSETO reg/mem80F 90 /0Set byte if overflow (OF = 1).SETNO reg/mem80F 91 /0Set byte if not overflow (OF = 0).SETB reg/mem8SETC reg/mem8SETNAE reg/mem80F 92 /0Set byte if below (CF = 1).Set byte if carry (CF = 1).Set byte if not above or equal (CF = 1).SETNB reg/mem8SETNC reg/mem8SETAE reg/mem80F 93 /0Set byte if not below (CF = 0).Set byte if not carry (CF = 0).Set byte if above or equal (CF = 0).SETZ reg/mem8SETE reg/mem80F 94 /0Set byte if zero (ZF = 1).Set byte if equal (ZF = 1).SETNZ reg/mem8SETNE reg/mem80F 95 /0Set byte if not zero (ZF = 0).Set byte if not equal (ZF = 0).SETBE reg/mem8SETNA reg/mem80F 96 /0Set byte if below or equal (CF = 1 or ZF = 1).Set byte if not above (CF = 1 or ZF = 1).SETNBE reg/mem8SETA reg/mem80F 97 /0Set byte if not below or equal (CF = 0 and ZF = 0).Set byte if above (CF = 0 and ZF = 0).SETS reg/mem80F 98 /0Set byte if sign (SF = 1).SETNS reg/mem80F 99 /0Set byte if not sign (SF = 0).SETP reg/mem8SETPE reg/mem80F 9A /0Set byte if parity (PF = 1).Set byte if parity even (PF = 1).SETNP reg/mem8SETPO reg/mem80F 9B /0Set byte if not parity (PF = 0).Set byte if parity odd (PF = 0).Instruction ReferenceSETcc225AMD64 Technology24594—Rev.

3.13—July 2007MnemonicOpcodeDescriptionSETL reg/mem8SETNGE reg/mem80F 9C /0Set byte if less (SF <> OF).Set byte if not greater or equal (SF <> OF).SETNL reg/mem8SETGE reg/mem80F 9D /0Set byte if not less (SF = OF).Set byte if greater or equal (SF = OF).SETLE reg/mem8SETNG reg/mem80F 9E /0Set byte if less or equal (ZF = 1 or SF <> OF).Set byte if not greater (ZF = 1 or SF <> OF).SETNLE reg/mem8SETG reg/mem80F 9F /0Set byte if not less or equal (ZF = 0 and SF = OF).Set byte if greater (ZF = 0 and SF = OF).Related InstructionsNonerFLAGS AffectedNoneExceptionsExceptionStack, #SSVirtualReal 8086 ProtectedXXXA memory address exceeded the stack segment limit or wasnon-canonical.XXXA memory address exceeded a data segment limit or was noncanonical.XThe destination operand was in a non-writable segment.XA null data segment was used to reference memory.XA page fault resulted from the execution of the instruction.General protection,#GPPage fault, #PF226Cause of ExceptionXSETccInstruction Reference24594—Rev.

3.13—July 2007AMD64 TechnologySFENCEStore FenceActs as a barrier to force strong memory ordering (serialization) between store instructions precedingthe SFENCE and store instructions that follow the SFENCE. Stores to differing memory types, orwithin the WC memory type, may become visible out of program order; the SFENCE instructionen1sures that the system completes all previous stores in such a way that they are globally visiblebefore executing subsequent stores. This includes emptying the store buffer and all write-combiningbuffers.The SFENCE instruction is weakly-ordered with respect to load instructions, data and instructionprefetches, and the LFENCE instruction. Speculative loads initiated by the processor, or specifiedexplicitly using cache-prefetch instructions, can be reordered around an SFENCE.In addition to store instructions, SFENCE is strongly ordered with respect to other SFENCEinstructions, MFENCE instructions, and serializing instructions.

Further details on the use ofMFENCE to order accesses among differing memory types may be found in AMD64 ArchitectureProgrammer’s Manual Volume 2: System Programming, section 7.4 “Memory Types” on page 168.Support for the SFENCE instruction is indicated when the SSE bit (bit 25) is set to 1 in EDX afterexecuting CPUID function 0000_0001h.MnemonicOpcodeSFENCE0F AE F8DescriptionForce strong ordering of (serialized) store operations.Related InstructionsLFENCE, MFENCErFLAGS AffectedNoneExceptionsExceptionInvalid Opcode,#UDVirtualReal 8086 ProtectedXXXCause of ExceptionThe SSE instructions are not supported, as indicated by EDXbit 25 of CPUID function 0000_0001h; and the AMDextensions to MMX are not supported, as indicated by EDX bit22 of CPUID function 8000_0001h.1.Instruction ReferenceSFENCE227AMD64 Technology24594—Rev.

3.13—July 2007SHLShift LeftThis instruction is synonymous with the SAL instruction. For information, see “SAL SHL” onpage 216.228SHLInstruction Reference24594—Rev. 3.13—July 2007AMD64 TechnologySHLDShift Left DoubleShifts the bits of a register or memory location (first operand) to the left by the number of bit positionsin an unsigned immediate value or the CL register (third operand), and shifts in a bit pattern (secondoperand) from the right. At the end of the shift operation, the CF flag contains the last bit shifted out ofthe first operand.The processor masks the upper three bits of the count operand, thus restricting the count to a numberbetween 0 and 31. When the destination is 64 bits wide, the processor masks the upper two bits of thecount, providing a count in the range of 0 to 63.

If the masked count is greater than the operand size,the result in the destination register is undefined.If the shift count is 0, no flags are modified.If the count is 1 and the sign of the operand being shifted changes, the instruction sets the OF flag to 1.If the count is greater than 1, OF is undefined.MnemonicOpcodeDescriptionSHLD reg/mem16, reg16, imm80F A4 /r ibShift bits of a 16-bit destination register or memoryoperand to the left the number of bits specified in an 8bit immediate value, while shifting in bits from thesecond operand.SHLD reg/mem16, reg16, CL0F A5 /rShift bits of a 16-bit destination register or memoryoperand to the left the number of bits specified in the CLregister, while shifting in bits from the second operand.SHLD reg/mem32, reg32, imm80F A4 /r ibShift bits of a 32-bit destination register or memoryoperand to the left the number of bits specified in an 8bit immediate value, while shifting in bits from thesecond operand.SHLD reg/mem32, reg32, CL0F A5 /rShift bits of a 32-bit destination register or memoryoperand to the left the number of bits specified in the CLregister, while shifting in bits from the second operand.SHLD reg/mem64, reg64, imm80F A4 /r ibShift bits of a 64-bit destination register or memoryoperand to the left the number of bits specified in an 8bit immediate value, while shifting in bits from thesecond operand.SHLD reg/mem64, reg64, CL0F A5 /rShift bits of a 64-bit destination register or memoryoperand to the left the number of bits specified in the CLregister, while shifting in bits from the second operand.Related InstructionsSHRD, SAL, SAR, SHR, SHLInstruction ReferenceSHLD229AMD64 Technology24594—Rev.

3.13—July 2007rFLAGS AffectedIDVIPVIFACVMRFNTIOPLOFDFIFTFM2120191817161413–12111098SFZFAFPFCFMMUMM76420Note: Bits 31–22, 15, 5, 3, and 1 are reserved. A flag set to 1 or cleared to 0 is M (modified). Unaffected flags are blank.Undefined flags are U.ExceptionsExceptionStack, #SSVirtualReal 8086 ProtectedCause of ExceptionXXXA memory address exceeded the stack segment limit or wasnon-canonical.XXXA memory address exceeded a data segment limit or was noncanonical.XThe destination operand was in a non-writable 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.230SHLDInstruction Reference24594—Rev.

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

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

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

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