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

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

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

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

However, two groups of instructions default to64-bit operand size and do not need a REX prefix: (1) near branches and (2) all instructions, exceptfar branches, that implicitly reference the RSP. See Table B-5 on page 400 for a list of allinstructions that default to 64-bit operand size.Zero-Extension of 32-Bit Results: Operations on 32-bit operands in 64-bit mode zero-extend thehigh 32 bits of 64-bit GPR destination registers.No Extension of 8-Bit and 16-Bit Results: Operations on 8-bit and 16-bit operands in 64-bitmode leave the high 56 or 48 bits, respectively, of 64-bit GPR destination registers unchanged.Shift and Rotate Counts: When the operand size is 64 bits, shifts and rotates use one additionalbit (6 bits total) to specify shift-count or rotate-count, allowing 64-bit shifts and rotates.Immediates: The maximum size of immediate operands is 32 bits, except that 64-bit immediatescan be MOVed into 64-bit GPRs.

Immediates that are less than 64 bits are a maximum of 32 bits,and are sign-extended to 64 bits during use.General-Purpose Instructions in 64-Bit Mode373AMD64 Technology••24594—Rev. 3.13—July 2007Displacements and Offsets: The maximum size of an address displacement or offset is 32 bits,except that 64-bit offsets can be used by specific MOV opcodes that read or write AL or rAX.Displacements and offsets that are less than 64 bits are a maximum of 32 bits, and are signextended to 64 bits during use.Undefined High 32 Bits After Mode Change: The processor does not preserve the upper 32 bitsof the 64-bit GPRs across switches from 64-bit mode to compatibility or legacy modes. Incompatibility or legacy mode, the upper 32 bits of the GPRs are undefined and not accessible tosoftware.B.2Operation and Operand Size in 64-Bit ModeTable B-1 on page 374 lists the integer instructions, showing operand size in 64-bit mode and the stateof the high 32 bits of destination registers when 32-bit operands are used.

Opcodes, such as byteoperand versions of several instructions, that do not appear in Table B-1 are covered by the generalrules described in “General Rules for 64-Bit Mode” on page 373.Table B-1. Operations and Operands in 64-Bit ModeInstruction andOpcode (hex)1AAA - ASCII Adjust after Addition37AAD - ASCII Adjust AX before DivisionD5AAM - ASCII Adjust AX after MultiplyD4AAS - ASCII Adjust AL after Subtraction3FType ofOperation2DefaultOperandSize3For 32-BitOperand Size4For 64-BitOperand Size4INVALID IN 64-BIT MODE (invalid-opcode exception)INVALID IN 64-BIT MODE (invalid-opcode exception)INVALID IN 64-BIT MODE (invalid-opcode exception)INVALID IN 64-BIT MODE (invalid-opcode exception)Note:1.

See “General Rules for 64-Bit Mode” on page 373, for opcodes that do not appear in this table.2. The type of operation, excluding considerations of operand size or extension of results. See “General Rules for 64Bit Mode” on page 373 for definitions of “Promoted to 64 bits” and related topics.3. If “Type of Operation” is 64 bits, a REX prefix is needed for 64-bit operand size, unless the instruction size defaultsto 64 bits.

If the operand size is fixed, operand-size overrides are silently ignored.4. Special actions in 64-bit mode, in addition to legacy-mode actions. Zero or sign extensions apply only to result operands, not source operands. Unless otherwise stated, 8-bit and 16-bit results leave the high 56 or 48 bits, respectively, of 64-bit destination registers unchanged. Immediates and branch displacements are sign-extended to 64bits.5.

Any pointer registers (rDI, rSI) or count registers (rCX) are address-sized and default to 64 bits. For 32-bit addresssize, any pointer and count registers are zero-extended to 64 bits.6. The default operand size can be overridden to 16 bits with 66h prefix, but there is no 32-bit operand-size overridein 64-bit mode.374General-Purpose Instructions in 64-Bit Mode24594—Rev. 3.13—July 2007AMD64 TechnologyTable B-1. Operations and Operands in 64-Bit Mode (continued)Instruction andOpcode (hex)1Type ofOperation2DefaultOperandSize3For 32-BitOperand Size4Promoted to64 bits.32 bitsZero-extends 32bit registerresults to 64 bits.Promoted to64 bits.32 bitsZero-extends 32bit registerresults to 64 bits.Promoted to64 bits.32 bitsZero-extends 32bit registerresults to 64 bits.For 64-BitOperand Size4ADC—Add with Carry11131581 /283 /2ADD—Signed or Unsigned Add01030581 /083 /0AND—Logical AND21232581 /483 /4ARPL - Adjust Requestor Privilege Level63BOUND - Check Array Against Bounds62BSF—Bit Scan Forward0F BCOPCODE USED as MOVSXD in 64-BIT MODEINVALID IN 64-BIT MODE (invalid-opcode exception)Promoted to64 bits.32 bitsZero-extends 32bit registerresults to 64 bits.Note:1.

See “General Rules for 64-Bit Mode” on page 373, for opcodes that do not appear in this table.2. The type of operation, excluding considerations of operand size or extension of results. See “General Rules for 64Bit Mode” on page 373 for definitions of “Promoted to 64 bits” and related topics.3. If “Type of Operation” is 64 bits, a REX prefix is needed for 64-bit operand size, unless the instruction size defaultsto 64 bits. If the operand size is fixed, operand-size overrides are silently ignored.4.

Special actions in 64-bit mode, in addition to legacy-mode actions. Zero or sign extensions apply only to result operands, not source operands. Unless otherwise stated, 8-bit and 16-bit results leave the high 56 or 48 bits, respectively, of 64-bit destination registers unchanged. Immediates and branch displacements are sign-extended to 64bits.5. Any pointer registers (rDI, rSI) or count registers (rCX) are address-sized and default to 64 bits. For 32-bit addresssize, any pointer and count registers are zero-extended to 64 bits.6. The default operand size can be overridden to 16 bits with 66h prefix, but there is no 32-bit operand-size overridein 64-bit mode.General-Purpose Instructions in 64-Bit Mode375AMD64 Technology24594—Rev.

3.13—July 2007Table B-1. Operations and Operands in 64-Bit Mode (continued)Instruction andOpcode (hex)1BSR—Bit Scan Reverse0F BDBSWAP—Byte Swap0F C8 through 0F CFType ofOperation2DefaultOperandSize3For 32-BitOperand Size4Promoted to64 bits.32 bitsZero-extends 32bit registerresults to 64 bits.Promoted to64 bits.32 bitsZero-extends 32bit registerresults to 64 bits.Promoted to64 bits.32 bitsNo GPR register results.Promoted to64 bits.32 bitsZero-extends 32bit registerresults to 64 bits.Promoted to64 bits.32 bitsZero-extends 32bit registerresults to 64 bits.Promoted to64 bits.32 bitsZero-extends 32bit registerresults to 64 bits.For 64-BitOperand Size4Swap all 8 bytesof a 64-bit GPR.BT—Bit Test0F A30F BA /4BTC—Bit Test and Complement0F BB0F BA /7BTR—Bit Test and Reset0F B30F BA /6BTS—Bit Test and Set0F AB0F BA /5CALL—Procedure Call NearE8FF /2See “Near Branches in 64-Bit Mode” in Volume 1.Promoted to64 bits.Promoted to64 bits.64 bits64 bitsCan’t encode.6Can’t encode.6RIP = RIP + 32bit displacementsign-extended to64 bits.RIP = 64-bitoffset fromregister ormemory.Note:1.

See “General Rules for 64-Bit Mode” on page 373, for opcodes that do not appear in this table.2. The type of operation, excluding considerations of operand size or extension of results. See “General Rules for 64Bit Mode” on page 373 for definitions of “Promoted to 64 bits” and related topics.3. If “Type of Operation” is 64 bits, a REX prefix is needed for 64-bit operand size, unless the instruction size defaultsto 64 bits.

If the operand size is fixed, operand-size overrides are silently ignored.4. Special actions in 64-bit mode, in addition to legacy-mode actions. Zero or sign extensions apply only to result operands, not source operands. Unless otherwise stated, 8-bit and 16-bit results leave the high 56 or 48 bits, respectively, of 64-bit destination registers unchanged. Immediates and branch displacements are sign-extended to 64bits.5. Any pointer registers (rDI, rSI) or count registers (rCX) are address-sized and default to 64 bits.

For 32-bit addresssize, any pointer and count registers are zero-extended to 64 bits.6. The default operand size can be overridden to 16 bits with 66h prefix, but there is no 32-bit operand-size overridein 64-bit mode.376General-Purpose Instructions in 64-Bit Mode24594—Rev. 3.13—July 2007AMD64 TechnologyTable B-1. Operations and Operands in 64-Bit Mode (continued)Instruction andOpcode (hex)1CALL—Procedure Call Far9AFF /3CBW, CWDE, CDQE—Convert Byte toWord, Convert Word to Doubleword,Convert Doubleword to QuadwordType ofOperation2DefaultOperandSize3For 32-BitOperand Size4For 64-BitOperand Size4See “Branches to 64-Bit Offsets” in Volume 1.INVALID IN 64-BIT MODE (invalid-opcode exception)Promoted to64 bits.Promoted to64 bits.98CDQ32 bitsIf selector points to a gate, thenRIP = 64-bit offset from gate, elseRIP = zero-extended 32-bit offsetfrom far pointer referenced ininstruction.CWDE: Converts32 bitsword to(size of desti- doubleword.nation regisZero-extendster)EAX to RAX.CDQE (newmnemonic):Convertsdoubleword toquadword.RAX = signextended EAX.see CWD, CDQ, CQOCDQE (new mnemonic)see CBW, CWDE, CDQECDWEsee CBW, CWDE, CDQECLC—Clear Carry FlagF8CLD—Clear Direction FlagFCCLFLUSH—Cache Line Invalidate0F AE /7CLGI—Clear Global Interrupt0F 01 DDCLI—Clear Interrupt FlagFASame aslegacy mode.Not relevant.

No GPR register results.Same asNot relevant. No GPR register results.legacy mode.Same aslegacy mode.Not relevant. No GPR register results.Same aslegacy modeNot relevant No GPR register results.Same asNot relevant. No GPR register results.legacy mode.Note:1. See “General Rules for 64-Bit Mode” on page 373, for opcodes that do not appear in this table.2.

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

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

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

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