P60ARM-B/IG/GP1Q Zarlink Semiconductor, Inc., P60ARM-B/IG/GP1Q Datasheet - Page 38

no-image

P60ARM-B/IG/GP1Q

Manufacturer Part Number
P60ARM-B/IG/GP1Q
Description
Microprocessor, 32-Bit Data Bus, 30MHz Processor, 100-QFP
Manufacturer
Zarlink Semiconductor, Inc.
Datasheet
P60ARM-B
4.6 Multiply and Multiply-Accumulate (MUL, MLA)
The instruction is only executed if the condition is true. The various conditions are defined at the beginning
of this chapter. The instruction encoding is shown in Figure 16: Multiply Instructions.
The multiply and multiply-accumulate instructions use a 2 bit Booth's algorithm to perform integer
multiplication. They give the least significant 32 bits of the product of two 32 bit operands, and may be used
to synthesize higher precision multiplications.
The multiply form of the instruction gives Rd:=Rm*Rs. Rn is ignored, and should be set to zero for
compatibility with possible future upgrades to the instruction set.
The multiply-accumulate form gives Rd:=Rm*Rs+Rn, which can save an explicit ADD instruction in some
circumstances.
Both forms of the instruction work on operands which may be considered as signed (2's complement) or
unsigned integers.
4.6.1 Operand restrictions
Due to the way multiplication is implemented, certain combinations of operand registers should be
avoided. (The assembler will issue a warning if these restrictions are overlooked.)
The destination register (Rd) should not be the same as the Rm operand register, as Rd is used to hold
intermediate values and Rm is used repeatedly during the multiply. A MUL will give a zero result if
Rm=Rd, and a MLA will give a meaningless result. R15 shall not be used as an operand or as the destination
register.
All other register combinations will give correct results, and Rd, Rn and Rs may use the same register when
required.
34
31
Cond
28
27
0 0 0 0 0 0 A S
22
21
Figure 16: Multiply Instructions
20
19
Rd
16
15
Rn
12
Operand registers
Destination register
Set condition code
Accumulate
Condition Field
11
0 = do not alter condition codes
1 = set condition codes
0 = multiply only
1 = multiply and accumulate
Rs
8
1 0 0 1
7
4
3
Rm
0

Related parts for P60ARM-B/IG/GP1Q