13.07.2015 Views

Volume 3: General-Purpose and System Instructions - Stanford ...

Volume 3: General-Purpose and System Instructions - Stanford ...

Volume 3: General-Purpose and System Instructions - Stanford ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

24594 Rev. 3.10 February 2005 AMD64 TechnologyXORLogical Exclusive ORPerforms a bitwise exclusive OR operation on both oper<strong>and</strong>s <strong>and</strong> stores the result inthe first oper<strong>and</strong> location. The first oper<strong>and</strong> can be a register or memory location. Thesecond oper<strong>and</strong> can be an immediate value, a register, or a memory location. XOR-inga register with itself clears the register.The forms of the XOR instruction that write to memory support the LOCK prefix. Fordetails about the LOCK prefix, see “Lock Prefix” on page 10.The instruction performs the following operation for each bit:X Y X XOR Y0 0 00 1 11 0 11 1 0Mnemonic Opcode DescriptionXOR AL, imm8XOR AX, imm16XOR EAX, imm32XOR RAX, imm32XOR reg/mem8, imm8XOR reg/mem16, imm1634 ib35 iw35 id35 id80 /6 ib81 /6 iwXOR the contents of AL with an immediate 8-bit oper<strong>and</strong> <strong>and</strong>store the result in AL.XOR the contents of AX with an immediate 16-bit oper<strong>and</strong> <strong>and</strong>store the result in AX.XOR the contents of EAX with an immediate 32-bit oper<strong>and</strong> <strong>and</strong>store the result in EAX.XOR the contents of RAX with a sign-extended immediate 32-bitoper<strong>and</strong> <strong>and</strong> store the result in RAX.XOR the contents of an 8-bit destination register or memoryoper<strong>and</strong> with an 8-bit immediate value <strong>and</strong> store the result in thedestination.XOR the contents of a 16-bit destination register or memoryoper<strong>and</strong> with a 16-bit immediate value <strong>and</strong> store the result in thedestination.XOR 293

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!