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

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

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

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

3.13—July 2007AMD64 TechnologyXCHGExchangeExchanges the contents of the two operands. The operands can be two general-purpose registers or aregister and a memory location. If either operand references memory, the processor locksautomatically, whether or not the LOCK prefix is used and independently of the value of IOPL. Fordetails about the LOCK prefix, see “Lock Prefix” on page 8.The x86 architecture commonly uses the XCHG EAX, EAX instruction (opcode 90h) as a one-byteNOP.

In 64-bit mode, the processor treats opcode 90h as a true NOP only if it would exchange rAXwith itself. Without this special handling, the instruction would zero-extend the upper 32 bits of RAX,and thus it would not be a true no-operation. Opcode 90h can still be used to exchange rAX and r8 ifthe appropriate REX prefix is used.This special handling does not apply to the two-byte ModRM form of the XCHG instruction.MnemonicOpcodeDescriptionXCHG AX, reg1690 +rwExchange the contents of the AX register with thecontents of a 16-bit register.XCHG reg16, AX90 +rwExchange the contents of a 16-bit register with thecontents of the AX register.XCHG EAX, reg3290 +rdExchange the contents of the EAX register with thecontents of a 32-bit register.XCHG reg32, EAX90 +rdExchange the contents of a 32-bit register with thecontents of the EAX register.XCHG RAX, reg6490 +rqExchange the contents of the RAX register with thecontents of a 64-bit register.XCHG reg64, RAX90 +rqExchange the contents of a 64-bit register with thecontents of the RAX register.XCHG reg/mem8, reg886 /rExchange the contents of an 8-bit register with thecontents of an 8-bit register or memory operand.XCHG reg8, reg/mem886 /rExchange the contents of an 8-bit register or memoryoperand with the contents of an 8-bit register.XCHG reg/mem16, reg1687 /rExchange the contents of a 16-bit register with thecontents of a 16-bit register or memory operand.XCHG reg16, reg/mem1687 /rExchange the contents of a 16-bit register or memoryoperand with the contents of a 16-bit register.XCHG reg/mem32, reg3287 /rExchange the contents of a 32-bit register with thecontents of a 32-bit register or memory operand.XCHG reg32, reg/mem3287 /rExchange the contents of a 32-bit register or memoryoperand with the contents of a 32-bit register.XCHG reg/mem64, reg6487 /rExchange the contents of a 64-bit register with thecontents of a 64-bit register or memory operand.XCHG reg64, reg/mem6487 /rExchange the contents of a 64-bit register or memoryoperand with the contents of a 64-bit register.Instruction ReferenceXCHG245AMD64 Technology24594—Rev.

3.13—July 2007Related InstructionsBSWAP, XADDrFLAGS AffectedNoneExceptionsExceptionStack, #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 source or destination operand was in a non-writablesegment.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.246XCHGInstruction Reference24594—Rev. 3.13—July 2007AMD64 TechnologyXLATXLATBTranslate Table IndexUses the unsigned integer in the AL register as an offset into a table and copies the contents of the tableentry at that location to the AL register.The instruction uses seg:[rBX] as the base address of the table. The value of seg defaults to the DSsegment, but may be overridden by a segment prefix.This instruction writes AL without changing RAX[63:8].

This instruction ignores operand size.The single-operand form of the XLAT instruction uses the operand to document the segment andaddress size attribute, but it uses the base address specified by the rBX register.This instruction is often used to translate data from one format (such as ASCII) to another (such asEBCDIC).MnemonicOpcodeDescriptionXLAT mem8D7Set AL to the contents of DS:[rBX + unsigned AL].XLATBD7Set AL to the contents of DS:[rBX + unsigned AL].Related InstructionsNonerFLAGS AffectedNoneExceptionsExceptionVirtualReal 8086 ProtectedCause of ExceptionStack, #SSXXXA memory address exceeded the stack segment limit or wasnon-canonical.General protection,#GPXXXA memory address exceeded a data segment limit or was noncanonical.XA null data segment was used to reference memory.XA page fault resulted from the execution of the instruction.Page fault, #PFXGeneral-Purpose Instruction Reference247AMD64 Technology24594—Rev.

3.13—July 2007XORLogical Exclusive ORPerforms a bitwise exclusive OR operation on both operands and stores the result in the first operandlocation. The first operand can be a register or memory location. The second operand can be animmediate value, a register, or a memory location. XOR-ing a register with itself clears the register.The forms of the XOR instruction that write to memory support the LOCK prefix. For details about theLOCK prefix, see “Lock Prefix” on page 8.The instruction performs the following operation for each bit:XYX XOR Y000011101110MnemonicOpcodeDescriptionXOR AL, imm834 ibXOR the contents of AL with an immediate 8-bitoperand and store the result in AL.XOR AX, imm1635 iwXOR the contents of AX with an immediate 16-bitoperand and store the result in AX.XOR EAX, imm3235 idXOR the contents of EAX with an immediate 32-bitoperand and store the result in EAX.XOR RAX, imm3235 idXOR the contents of RAX with a sign-extendedimmediate 32-bit operand and store the result in RAX.XOR reg/mem8, imm880 /6 ibXOR the contents of an 8-bit destination register ormemory operand with an 8-bit immediate value andstore the result in the destination.XOR reg/mem16, imm1681 /6 iwXOR the contents of a 16-bit destination register ormemory operand with a 16-bit immediate value andstore the result in the destination.XOR reg/mem32, imm3281 /6 idXOR the contents of a 32-bit destination register ormemory operand with a 32-bit immediate value andstore the result in the destination.XOR reg/mem64, imm3281 /6 idXOR the contents of a 64-bit destination register ormemory operand with a sign-extended 32-bit immediatevalue and store the result in the destination.XOR reg/mem16, imm883 /6 ibXOR the contents of a 16-bit destination register ormemory operand with a sign-extended 8-bit immediatevalue and store the result in the destination.248General-Purpose Instruction Reference24594—Rev.

3.13—July 2007MnemonicAMD64 TechnologyOpcodeDescriptionXOR reg/mem32, imm883 /6 ibXOR the contents of a 32-bit destination register ormemory operand with a sign-extended 8-bit immediatevalue and store the result in the destination.XOR reg/mem64, imm883 /6 ibXOR the contents of a 64-bit destination register ormemory operand with a sign-extended 8-bit immediatevalue and store the result in the destination.XOR reg/mem8, reg830 /rXOR the contents of an 8-bit destination register ormemory operand with the contents of an 8-bit registerand store the result in the destination.XOR reg/mem16, reg1631 /rXOR the contents of a 16-bit destination register ormemory operand with the contents of a 16-bit registerand store the result in the destination.XOR reg/mem32, reg3231 /rXOR the contents of a 32-bit destination register ormemory operand with the contents of a 32-bit registerand store the result in the destination.XOR reg/mem64, reg6431 /rXOR the contents of a 64-bit destination register ormemory operand with the contents of a 64-bit registerand store the result in the destination.XOR reg8, reg/mem832 /rXOR the contents of an 8-bit destination register withthe contents of an 8-bit register or memory operand andstore the results in the destination.XOR reg16, reg/mem1633 /rXOR the contents of a 16-bit destination register withthe contents of a 16-bit register or memory operand andstore the results in the destination.XOR reg32, reg/mem3233 /rXOR the contents of a 32-bit destination register withthe contents of a 32-bit register or memory operand andstore the results in the destination.XOR reg64, reg/mem6433 /rXOR the contents of a 64-bit destination register withthe contents of a 64-bit register or memory operand andstore the results in the destination.Related InstructionsOR, AND, NOT, NEGGeneral-Purpose Instruction Reference249AMD64 Technology24594—Rev.

3.13—July 2007rFLAGS AffectedIDVIPVIFACVMRFNTIOPLOFDFIFTF02120191817161413–12111098SFZFAFPFCFMMUM076420Note: Bits 31–22, 15, 5, 3, and 1 are reserved. A flag set to 1 or cleared to 0 is M (modified). Unaffected flags areblank. 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.250General-Purpose Instruction Reference24594—Rev. 3.13—July 20074AMD64 TechnologySystem Instruction ReferenceThis chapter describes the function, mnemonic syntax, opcodes, affected flags, and possibleexceptions generated by the system instructions.

The system instructions are used to establish theoperating mode, access processor resources, handle program and system errors, and manage memory.Many of these instructions can only be executed by privileged software, such as the operating systemkernel and interrupt handlers, that run at the highest privilege level.

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

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

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

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