[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Assembler Language Reference

rldicl (Rotate Left Double Word Immediate then Clear Left) Instruction

Purpose

This instruction should only be used on 64-bit PowerPC processors running a 64-bit application.

Syntax

PowerPC64
rldicl rA, rS, rB, MB (Rc=0)
rldicl. rA, rS, rB, MB (Rc=1)

Description

The contents of rS are rotated left the number of bits specified by operand SH. A mask is generated having 1 bits from bit MB through bit 63 and 0 bits elsewhere. The rotated data is ANDed with the generated mask and the result is placed into rA.

This instruction is defined only for 64-bit implementations. Using it on a 32-bit implementation will cause the system illegal instruction error handler to be invoked.

Note that rldicl can be used to extract, rotate, shift, and clear bit fields using the methods shown below:

To extract an n-bit field, that starts at bit position b in rS, right-justified into rA (clearing the remaining 64 - n bits of rA), set SH = b + n and MB = 64 - n.

To rotate the contents of a register left by n bits, set SH = n and MB = 0; to rotate the contents of a register right by n bits, set SH = (64 - n), and MB = 0.

To shift the contents of a register right by n bits, set SH = 64 - n and MB = n.

To clear the high-order n bits of a register, set SH = 0 and MB = n.

Other registers altered:

Parameters

rA ***DESCRIPTION***
rS ***DESCRIPTION***
rB ***DESCRIPTION***
MB ***DESCRIPTION***

Examples




Related Information


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]