P60ARM-B/IG/GP1N Zarlink Semiconductor, Inc., P60ARM-B/IG/GP1N Datasheet - Page 29

no-image

P60ARM-B/IG/GP1N

Manufacturer Part Number
P60ARM-B/IG/GP1N
Description
A Low Power, General Purpose 32 Bit RISC Microprocessor
Manufacturer
Zarlink Semiconductor, Inc.
Datasheet
4.4.2 Shifts
When the second operand is specified to be a shifted register, the operation of the barrel shifter is controlled
by the Shift field in the instruction. This field indicates the type of shift to be performed (logical left or right,
arithmetic right or rotate right). The amount by which the register should be shifted may be contained in
an immediate field in the instruction, or in the bottom byte of another register (other than R15). The
encoding for the different shift types is shown in Figure 9: ARM Shift Operations .
Instruction specified shift amount
When the shift amount is specified in the instruction, it is contained in a 5 bit field which may take any value
from 0 to 31. A logical shift left (LSL) takes the contents of Rm and moves each bit by the specified amount
to a more significant position. The least significant bits of the result are filled with zeros, and the high bits
of Rm which do not map into the result are discarded, except that the least significant discarded bit becomes
the shifter carry output which may be latched into the C bit of the CPSR when the ALU operation is in the
logical class (see above). For example, the effect of LSL #5 is shown in Figure 10: Logical Shift Left .
Note that LSL #0 is a special case, where the shifter carry out is the old value of the CPSR C flag. The
contents of Rm are used directly as the second operand.
A logical shift right (LSR) is similar, but the contents of Rm are moved to less significant positions in the
result. LSR #5 has the effect shown in Figure 11: Logical Shift Right.
carry out
11
31
7 6
27 26
5
0
4
Shift type
Shift amount
00 = logical left
01 = logical right
10 = arithmetic right
11 = rotate right
5 bit unsigned integer
Figure 9: ARM Shift Operations
Figure 10: Logical Shift Left
value of operand 2
contents of Rm
11
Rs
Instruction Set - Shifts
8 7 6
0
5 4
1
Shift type
Shift register
00 = logical left
01 = logical right
10 = arithmetic right
11 = rotate right
Shift amount specified in
bottom byte of Rs
0 0 0 0 0
0
25

Related parts for P60ARM-B/IG/GP1N