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

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

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

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

2ACALL—Call ProcedureINSTRUCTION SET REFERENCE, A-MTHEN #SS(SS selector); FI;IF (CallGate(InstructionPointer) AND FFFFH) not in code segment limitTHEN #GP(0); FI;SS ← newSS;(* Segment descriptor information also loaded *)ESP ← newESP;CS:IP ← CallGate(CS:InstructionPointer);(* Segment descriptor information also loaded *)Push(oldSS:oldESP); (* From calling procedure *)temp ← parameter count from call gate, masked to 5 bits;Push(parameters from calling procedure’s stack, temp)Push(oldCS:oldEIP); (* Return address to calling procedure *)ELSE (* CallGateSize = 64 *)IF pushing 32 bytes on the stack touches non-canonical addressesTHEN #SS(SS selector); FI;IF (CallGate(InstructionPointer) is non-canonical)THEN #GP(0); FI;SS ← newSS; (* New SS is NULL)RSP ← newESP;CS:IP ← CallGate(CS:InstructionPointer);(* Segment descriptor information also loaded *)Push(oldSS:oldESP); (* From calling procedure *)Push(oldCS:oldEIP); (* Return address to calling procedure *)FI;FI;CPL ← CodeSegment(DPL)CS(RPL) ← CPLEND;SAME-PRIVILEGE:IF CallGateSize = 32THENIF stack does not have room for 8 bytesTHEN #SS(0); FI;IF CallGate(InstructionPointer) not within code segment limitTHEN #GP(0); FI;CS:EIP ← CallGate(CS:EIP) (* Segment descriptor information also loaded *)Push(oldCS:oldEIP); (* Return address to calling procedure *)ELSEIf CallGateSize = 16THENIF stack does not have room for 4 bytesTHEN #SS(0); FI;CALL—Call ProcedureVol.

2A 3-133INSTRUCTION SET REFERENCE, A-MIF CallGate(InstructionPointer) not within code segment limitTHEN #GP(0); FI;CS:IP ← CallGate(CS:instruction pointer);(* Segment descriptor information also loaded *)Push(oldCS:oldIP); (* Return address to calling procedure *)ELSE (* CallGateSize = 64)IF pushing 16 bytes on the stack touches non-canonical addressesTHEN #SS(0); FI;IF RIP non-canonicalTHEN #GP(0); FI;CS:IP ← CallGate(CS:instruction pointer);(* Segment descriptor information also loaded *)Push(oldCS:oldIP); (* Return address to calling procedure *)FI;FI;CS(RPL) ← CPLEND;TASK-GATE:IF task gate DPL < CPL or RPLTHEN #GP(task gate selector); FI;IF task gate not presentTHEN #NP(task gate selector); FI;Read the TSS segment selector in the task-gate descriptor;IF TSS segment selector local/global bit is set to localor index not within GDT limitsTHEN #GP(TSS selector); FI;Access TSS descriptor in GDT;IF TSS descriptor specifies that the TSS is busy (low-order 5 bits set to 00001)THEN #GP(TSS selector); FI;IF TSS not presentTHEN #NP(TSS selector); FI;SWITCH-TASKS (with nesting) to TSS;IF EIP not within code segment limitTHEN #GP(0); FI;END;TASK-STATE-SEGMENT:IF TSS DPL < CPL or RPLor TSS descriptor indicates TSS not availableTHEN #GP(TSS selector); FI;IF TSS is not presentTHEN #NP(TSS selector); FI;3-134 Vol.

2ACALL—Call ProcedureINSTRUCTION SET REFERENCE, A-MSWITCH-TASKS (with nesting) to TSS;IF EIP not within code segment limitTHEN #GP(0); FI;END;Flags AffectedAll flags are affected if a task switch occurs; no flags are affected if a task switch doesnot occur.Protected Mode Exceptions#GP(0)If the target offset in destination operand is beyond the newcode segment limit.If the segment selector in the destination operand is NULL.If the code segment selector in the gate is NULL.If a memory operand effective address is outside the CS, DS,ES, FS, or GS segment limit.If the DS, ES, FS, or GS register is used to access memory and itcontains a NULL segment selector.#GP(selector)If a code segment or gate or TSS selector index is outsidedescriptor table limits.If the segment descriptor pointed to by the segment selector inthe destination operand is not for a conforming-code segment,nonconforming-code segment, call gate, task gate, or task statesegment.If the DPL for a nonconforming-code segment is not equal to theCPL or the RPL for the segment’s segment selector is greaterthan the CPL.If the DPL for a conforming-code segment is greater than theCPL.If the DPL from a call-gate, task-gate, or TSS segmentdescriptor is less than the CPL or than the RPL of the call-gate,task-gate, or TSS’s segment selector.If the segment descriptor for a segment selector from a call gatedoes not indicate it is a code segment.If the segment selector from a call gate is beyond the descriptortable limits.If the DPL for a code-segment obtained from a call gate isgreater than the CPL.If the segment selector for a TSS has its local/global bit set forlocal.CALL—Call ProcedureVol.

2A 3-135INSTRUCTION SET REFERENCE, A-MIf a TSS segment descriptor specifies that the TSS is busy or notavailable.#SS(0)If pushing the return address, parameters, or stack segmentpointer onto the stack exceeds the bounds of the stack segment,when no stack switch occurs.If a memory operand effective address is outside the SSsegment limit.#SS(selector)If pushing the return address, parameters, or stack segmentpointer onto the stack exceeds the bounds of the stack segment,when a stack switch occurs.If the SS register is being loaded as part of a stack switch andthe segment pointed to is marked not present.If stack segment does not have room for the return address,parameters, or stack segment pointer, when stack switchoccurs.#NP(selector)If a code segment, data segment, stack segment, call gate, taskgate, or TSS is not present.#TS(selector)If the new stack segment selector and ESP are beyond the endof the TSS.If the new stack segment selector is NULL.If the RPL of the new stack segment selector in the TSS is notequal to the DPL of the code segment being accessed.If DPL of the stack segment descriptor for the new stacksegment is not equal to the DPL of the code segment descriptor.If the new stack segment is not a writable data segment.If segment-selector index for stack segment is outsidedescriptor table limits.#PF(fault-code)If a page fault occurs.#AC(0)If alignment checking is enabled and an unaligned memoryreference is made while the current privilege level is 3.#UDIf the LOCK prefix is used.Real-Address Mode Exceptions#GPIf a memory operand effective address is outside the CS, DS,ES, FS, or GS segment limit.If the target offset is beyond the code segment limit.#UDIf the LOCK prefix is used.Virtual-8086 Mode Exceptions#GP(0)3-136 Vol.

2AIf a memory operand effective address is outside the CS, DS,ES, FS, or GS segment limit.CALL—Call ProcedureINSTRUCTION SET REFERENCE, A-MIf the target offset is beyond the code segment limit.#PF(fault-code)If a page fault occurs.#AC(0)If alignment checking is enabled and an unaligned memoryreference is made.#UDIf the LOCK prefix is used.Compatibility Mode ExceptionsSame exceptions as in protected mode.#GP(selector)If a memory address accessed by the selector is in non-canonical space.#GP(0)If the target offset in the destination operand is non-canonical.64-Bit Mode Exceptions#GP(0)If a memory address is non-canonical.If target offset in destination operand is non-canonical.If the segment selector in the destination operand is NULL.If the code segment selector in the 64-bit gate is NULL.#GP(selector)If code segment or 64-bit call gate is outside descriptor tablelimits.If code segment or 64-bit call gate overlaps non-canonicalspace.If the segment descriptor pointed to by the segment selector inthe destination operand is not for a conforming-code segment,nonconforming-code segment, or 64-bit call gate.If the segment descriptor pointed to by the segment selector inthe destination operand is a code segment and has both the Dbit and the L- bit set.If the DPL for a nonconforming-code segment is not equal to theCPL, or the RPL for the segment’s segment selector is greaterthan the CPL.If the DPL for a conforming-code segment is greater than theCPL.If the DPL from a 64-bit call-gate is less than the CPL or than theRPL of the 64-bit call-gate.If the upper type field of a 64-bit call gate is not 0x0.If the segment selector from a 64-bit call gate is beyond thedescriptor table limits.If the DPL for a code-segment obtained from a 64-bit call gate isgreater than the CPL.If the code segment descriptor pointed to by the selector in the64-bit gate doesn't have the L-bit set and the D-bit clear.CALL—Call ProcedureVol.

2A 3-137INSTRUCTION SET REFERENCE, A-MIf the segment descriptor for a segment selector from the 64-bitcall gate does not indicate it is a code segment.#SS(0)If pushing the return offset or CS selector onto the stackexceeds the bounds of the stack segment when no stack switchoccurs.If a memory operand effective address is outside the SSsegment limit.If the stack address is in a non-canonical form.#SS(selector)If pushing the old values of SS selector, stack pointer, EFLAGS,CS selector, offset, or error code onto the stack violates thecanonical boundary when a stack switch occurs.#NP(selector)If a code segment or 64-bit call gate is not present.#TS(selector)If the load of the new RSP exceeds the limit of the TSS.#UD(64-bit mode only) If a far call is direct to an absolute address inmemory.#PF(fault-code)If a page fault occurs.#AC(0)If alignment checking is enabled and an unaligned memoryreference is made while the current privilege level is 3.If the LOCK prefix is used.3-138 Vol.

2ACALL—Call ProcedureINSTRUCTION SET REFERENCE, A-MCBW/CWDE/CDQE—Convert Byte to Word/Convert Word toDoubleword/Convert Doubleword to QuadwordOpcodeInstructionOp/En64-bitModeCompat/ DescriptionLeg Mode98CBWAValidValidAX ← sign-extend of AL.98CWDEAValidValidEAX ← sign-extend of AX.REX.W + 98CDQEAValidN.E.RAX ← sign-extend of EAX.Instruction Operand EncodingOp/EnOperand 1Operand 2Operand 3Operand 4ANANANANADescriptionDouble the size of the source operand by means of sign extension.

The CBW (convertbyte to word) instruction copies the sign (bit 7) in the source operand into every bitin the AH register. The CWDE (convert word to doubleword) instruction copies thesign (bit 15) of the word in the AX register into the high 16 bits of the EAX register.CBW and CWDE reference the same opcode. The CBW instruction is intended for usewhen the operand-size attribute is 16; CWDE is intended for use when the operandsize attribute is 32. Some assemblers may force the operand size. Others may treatthese two mnemonics as synonyms (CBW/CWDE) and use the setting of theoperand-size attribute to determine the size of values to be converted.In 64-bit mode, the default operation size is the size of the destination register.

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

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

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

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