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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

AMD64 Technology 24594 Rev. 3.10 February 2005SHLDShift Left DoubleShifts the bits of a register or memory location (first oper<strong>and</strong>) to the left by thenumber of bit positions in an unsigned immediate value or the CL register (thirdoper<strong>and</strong>), <strong>and</strong> shifts in a bit pattern (second oper<strong>and</strong>) from the right. At the end of theshift operation, the CF flag contains the last bit shifted out of the first oper<strong>and</strong>.The processor masks the upper three bits of the count oper<strong>and</strong>, thus restricting thecount to a number between 0 <strong>and</strong> 31. When the destination is 64 bits wide, theprocessor masks the upper two bits of the count, providing a count in the range of 0 to63. If the masked count is greater than the oper<strong>and</strong> size, the result in the destinationregister is undefined.If the shift count is 0, no flags are modified.If the count is 1 <strong>and</strong> the sign of the oper<strong>and</strong> being shifted changes, the instruction setsthe OF flag to 1. If the count is greater than 1, OF is undefined.Mnemonic Opcode DescriptionSHLD reg/mem16, reg16, imm80F A4 /r ibShift bits of a 16-bit destination register or memory oper<strong>and</strong> tothe left the number of bits specified in an 8-bit immediate value,while shifting in bits from the second oper<strong>and</strong>.SHLD reg/mem16, reg16, CL 0F A5 /rShift bits of a 16-bit destination register or memory oper<strong>and</strong> tothe left the number of bits specified in the CL register, whileshifting in bits from the second oper<strong>and</strong>.SHLD reg/mem32, reg32, imm80F A4 /r ibShift bits of a 32-bit destination register or memory oper<strong>and</strong> tothe left the number of bits specified in an 8-bit immediate value,while shifting in bits from the second oper<strong>and</strong>.SHLD reg/mem32, reg32, CL 0F A5 /rShift bits of a 32-bit destination register or memory oper<strong>and</strong> tothe left the number of bits specified in the CL register, whileshifting in bits from the second oper<strong>and</strong>.SHLD reg/mem64, reg64, imm80F A4 /r ibShift bits of a 64-bit destination register or memory oper<strong>and</strong> tothe left the number of bits specified in an 8-bit immediate value,while shifting in bits from the second oper<strong>and</strong>.SHLD reg/mem64, reg64, CL 0F A5 /rShift bits of a 64-bit destination register or memory oper<strong>and</strong> tothe left the number of bits specified in the CL register, whileshifting in bits from the second oper<strong>and</strong>.272 SHLD

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

Saved successfully!

Ooh no, something went wrong!