Главная » Просмотр файлов » Volume 2A Instruction Set Reference A-M

Volume 2A Instruction Set Reference A-M (794101), страница 36

Файл №794101 Volume 2A Instruction Set Reference A-M (Intel and AMD manuals) 36 страницаVolume 2A Instruction Set Reference A-M (794101) страница 362019-04-28СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

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

Useof the REX.W prefix promotes this instruction (CDQE when promoted) to operate on64-bit operands. In which case, CDQE copies the sign (bit 31) of the doubleword inthe EAX register into the high 32 bits of RAX.OperationIF OperandSize = 16 (* Instruction = CBW *)THENAX ← SignExtend(AL);ELSE IF (OperandSize = 32, Instruction = CWDE)EAX ← SignExtend(AX); FI;ELSE (* 64-Bit Mode, OperandSize = 64, Instruction = CDQE*)RAX ← SignExtend(EAX);FI;Flags AffectedNone.CBW/CWDE/CDQE—Convert Byte to Word/Convert Word to Doubleword/Convert Doubleword to QuadwordVol. 2A 3-139INSTRUCTION SET REFERENCE, A-MExceptions (All Operating Modes)#UD3-140 Vol.

2AIf the LOCK prefix is used.CBW/CWDE/CDQE—Convert Byte to Word/Convert Word to Doubleword/Convert Doubleword to QuadwordINSTRUCTION SET REFERENCE, A-MCLC—Clear Carry FlagOpcodeInstructionOp/En64-bitModeCompat/ DescriptionLeg ModeF8CLCAValidValidClear CF flag.Instruction Operand EncodingOp/EnOperand 1Operand 2Operand 3Operand 4ANANANANADescriptionClears the CF flag in the EFLAGS register. Operation is the same in all non-64-bitmodes and 64-bit mode.OperationCF ← 0;Flags AffectedThe CF flag is set to 0. The OF, ZF, SF, AF, and PF flags are unaffected.Exceptions (All Operating Modes)#UDCLC—Clear Carry FlagIf the LOCK prefix is used.Vol. 2A 3-141INSTRUCTION SET REFERENCE, A-MCLD—Clear Direction FlagOpcodeInstructionOp/En64-bitModeCompat/ DescriptionLeg ModeFCCLDAValidValidClear DF flag.Instruction Operand EncodingOp/EnOperand 1Operand 2Operand 3Operand 4ANANANANADescriptionClears the DF flag in the EFLAGS register.

When the DF flag is set to 0, string operations increment the index registers (ESI and/or EDI). Operation is the same in allnon-64-bit modes and 64-bit mode.OperationDF ← 0;Flags AffectedThe DF flag is set to 0. The CF, OF, ZF, SF, AF, and PF flags are unaffected.Exceptions (All Operating Modes)#UD3-142 Vol. 2AIf the LOCK prefix is used.CLD—Clear Direction FlagINSTRUCTION SET REFERENCE, A-MCLFLUSH—Flush Cache LineOpcodeInstructionOp/En64-bitModeCompat/ DescriptionLeg Mode0F AE /7CLFLUSH m8AValidValidFlushes cache linecontaining m8.Instruction Operand EncodingOp/EnOperand 1Operand 2Operand 3Operand 4AModRM:r/m (w)NANANADescriptionInvalidates the cache line that contains the linear address specified with the sourceoperand from all levels of the processor cache hierarchy (data and instruction). Theinvalidation is broadcast throughout the cache coherence domain.

If, at any level ofthe cache hierarchy, the line is inconsistent with memory (dirty) it is written tomemory before invalidation. The source operand is a byte memory location.The availability of CLFLUSH is indicated by the presence of the CPUID feature flagCLFSH (bit 19 of the EDX register, see “CPUID—CPU Identification” in this chapter).The aligned cache line size affected is also indicated with the CPUID instruction (bits8 through 15 of the EBX register when the initial value in the EAX register is 1).The memory attribute of the page containing the affected line has no effect on thebehavior of this instruction.

It should be noted that processors are free to speculatively fetch and cache data from system memory regions assigned a memory-typeallowing for speculative reads (such as, the WB, WC, and WT memory types).PREFETCHh instructions can be used to provide the processor with hints for this speculative behavior.

Because this speculative fetching can occur at any time and is nottied to instruction execution, the CLFLUSH instruction is not ordered with respect toPREFETCHh instructions or any of the speculative fetching mechanisms (that is, datacan be speculatively loaded into a cache line just before, during, or after the execution of a CLFLUSH instruction that references the cache line).CLFLUSH is only ordered by the MFENCE instruction. It is not guaranteed to beordered by any other fencing or serializing instructions or by another CLFLUSHinstruction. For example, software can use an MFENCE instruction to ensure thatprevious stores are included in the write-back.The CLFLUSH instruction can be used at all privilege levels and is subject to allpermission checking and faults associated with a byte load (and in addition, aCLFLUSH instruction is allowed to flush a linear address in an execute-only segment).Like a load, the CLFLUSH instruction sets the A bit but not the D bit in the pagetables.The CLFLUSH instruction was introduced with the SSE2 extensions; however,because it has its own CPUID feature flag, it can be implemented in IA-32 processorsCLFLUSH—Flush Cache LineVol.

2A 3-143INSTRUCTION SET REFERENCE, A-Mthat do not include the SSE2 extensions. Also, detecting the presence of the SSE2extensions with the CPUID instruction does not guarantee that the CLFLUSH instruction is implemented in the processor.CLFLUSH operation is the same in non-64-bit modes and 64-bit mode.OperationFlush_Cache_Line(SRC);Intel C/C++ Compiler Intrinsic EquivalentsCLFLUSHvoid _mm_clflush(void const *p)Protected Mode Exceptions#GP(0)For an illegal memory operand effective address in the CS, DS,ES, FS or GS segments.#SS(0)For an illegal address in the SS segment.#PF(fault-code)For a page fault.#UDIf CPUID.01H:EDX.CLFSH[bit 19] = 0.If the LOCK prefix is used.Real-Address Mode ExceptionsGP#UDIf any part of the operand lies outside the effective addressspace from 0 to FFFFH.If CPUID.01H:EDX.CLFSH[bit 19] = 0.If the LOCK prefix is used.Virtual-8086 Mode ExceptionsSame exceptions as in real address mode.#PF(fault-code)For a page fault.Compatibility Mode ExceptionsSame exceptions as in protected mode.64-Bit Mode Exceptions#SS(0)If a memory address referencing the SS segment is in a noncanonical form.#GP(0)If the memory address is in a non-canonical form.#PF(fault-code)For a page fault.#UDIf CPUID.01H:EDX.CLFSH[bit 19] = 0.If the LOCK prefix is used.3-144 Vol.

2ACLFLUSH—Flush Cache LineINSTRUCTION SET REFERENCE, A-MCLI — Clear Interrupt FlagOpcodeInstructionOp/En64-bitModeCompat/ DescriptionLeg ModeFACLIAValidValidClear interrupt flag;interrupts disabled wheninterrupt flag cleared.Instruction Operand EncodingOp/EnOperand 1Operand 2Operand 3Operand 4ANANANANADescriptionIf protected-mode virtual interrupts are not enabled, CLI clears the IF flag in theEFLAGS register.

No other flags are affected. Clearing the IF flag causes theprocessor to ignore maskable external interrupts. The IF flag and the CLI and STIinstruction have no affect on the generation of exceptions and NMI interrupts.When protected-mode virtual interrupts are enabled, CPL is 3, and IOPL is less than3; CLI clears the VIF flag in the EFLAGS register, leaving IF unaffected.

Table 3-6 indicates the action of the CLI instruction depending on the processor operating modeand the CPL/IOPL of the running program or procedure.CLI operation is the same in non-64-bit modes and 64-bit mode.Table 3-6. Decision Table for CLI ResultsPEVMIOPLCPLPVIVIPVMECLI Result0XXXXXXIF = 010≥ CPLXXXXIF = 010< CPL31XXVIF = 010< CPL<3XXXGP Fault10< CPLX0XXGP Fault113XXXXIF = 011<3XXX1VIF = 011<3XXX0GP FaultNOTES:* X = This setting has no impact.OperationIF PE = 0CLI — Clear Interrupt FlagVol. 2A 3-145INSTRUCTION SET REFERENCE, A-MTHENIF ← 0; (* Reset Interrupt Flag *)ELSEIF VM = 0;THENIF IOPL ≥ CPLTHENIF ← 0; (* Reset Interrupt Flag *)ELSEIF ((IOPL < CPL) and (CPL = 3) and (PVI = 1))THENVIF ← 0; (* Reset Virtual Interrupt Flag *)ELSE#GP(0);FI;FI;ELSE (* VM = 1 *)IF IOPL = 3THENIF ← 0; (* Reset Interrupt Flag *)ELSEIF (IOPL < 3) AND (VME = 1)THENVIF ← 0; (* Reset Virtual Interrupt Flag *)ELSE#GP(0);FI;FI;FI;FI;Flags AffectedIf protected-mode virtual interrupts are not enabled, IF is set to 0 if the CPL is equalto or less than the IOPL; otherwise, it is not affected.

The other flags in the EFLAGSregister are unaffected.When protected-mode virtual interrupts are enabled, CPL is 3, and IOPL is less than3; CLI clears the VIF flag in the EFLAGS register, leaving IF unaffected.Protected Mode Exceptions#GP(0)If the CPL is greater (has less privilege) than the IOPL of thecurrent program or procedure.#UDIf the LOCK prefix is used.3-146 Vol. 2ACLI — Clear Interrupt FlagINSTRUCTION SET REFERENCE, A-MReal-Address Mode Exceptions#UDIf the LOCK prefix is used.Virtual-8086 Mode Exceptions#GP(0)If the CPL is greater (has less privilege) than the IOPL of thecurrent program or procedure.#UDIf the LOCK prefix is used.Compatibility Mode ExceptionsSame exceptions as in protected mode.64-Bit Mode Exceptions#GP(0)If the CPL is greater (has less privilege) than the IOPL of thecurrent program or procedure.#UDIf the LOCK prefix is used.CLI — Clear Interrupt FlagVol.

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

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

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

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