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.

AMD64 Technology 24594 Rev. 3.10 February 2005RCRRotate Through Carry RightRotates the bits of a register or memory location (first oper<strong>and</strong>) to the right (towardthe less significant bit positions) <strong>and</strong> through the carry flag by the number of bitpositions in an unsigned immediate value or the CL register (second oper<strong>and</strong>). Thebits rotated through the carry flag are rotated back in at the left end (msb) of the firstoper<strong>and</strong> location.The processor masks the upper three bits in 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.For 1-bit rotates, the instruction sets the OF flag to the exclusive OR of the CF flag(before the rotate) <strong>and</strong> the most significant bit of the original value. When the rotatecount is greater than 1, the OF flag is undefined. When the rotate count is 0, no flagsare affected.Mnemonic Opcode DescriptionRCR reg/mem8, 1 D0 /3RCR reg/mem8,CL D2 /3RCR reg/mem8,imm8C0 /3 ibRCR reg/mem16,1 D1 /3RCR reg/mem16,CL D3 /3RCR reg/mem16, imm8C1 /3 ibRCR reg/mem32,1 D1 /3Rotate the 9 bits consisting of the carry flag <strong>and</strong> an 8-bit registeror memory location right 1 bit.Rotate the 9 bits consisting of the carry flag <strong>and</strong> an 8-bit registeror memory location right the number of bits specified in the CLregister.Rotate the 9 bits consisting of the carry flag <strong>and</strong> an 8-bit registeror memory location right the number of bits specified by an 8-bitimmediate value.Rotate the 17 bits consisting of the carry flag <strong>and</strong> a 16-bit registeror memory location right 1 bit.Rotate the17 bits consisting of the carry flag <strong>and</strong> a 16-bit registeror memory location right the number of bits specified in the CLregister.Rotate the 17 bits consisting of the carry flag <strong>and</strong> a 16-bit registeror memory location right the number of bits specified by an 8-bitimmediate value.Rotate the 33 bits consisting of the carry flag <strong>and</strong> a 32-bit registeror memory location right 1 bit.242 RCR

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

Saved successfully!

Ooh no, something went wrong!