INSTRUCTION DESCRIPTIONS

MPY MPY

Signed Multiply

Operation:

±S1S2 D (parallel move)

±S1S2 D (parallel move)

±(S12-n)D (no parallel move)

Assembler Syntax:

MPY (±)S1,S2,D (parallel move)

MPY (±)S2,S1,D (parallel move)

MPY )S,#n,D (no parallel move)

Description: Multiply the two signed 24-bit source operands S1 and S2 and store the resulting product in the specified 56-bit destination accumulator D. Or, multiply the signed 24-bit source operand S by the positive 24-bit immediate operand 2-nand add/ subtract to/from the specified 56-bit destination accumulator D. The “–” sign option is used to negate the specified product prior to accumulation. The default sign option is “+”.

Note: When the processor is in the Double Precision Multiply Mode, the following instructions do not execute in the normal way and should only be used as part of the double precision multiply algorithm shown in Section 3.4 DOUBLE PRECISION MULTI-

PLY MODE:

MPY Y0, X0, A MAC X1, Y0, A MAC X0, Y1, A MAC Y1, X1, A

MPY Y0, X0, B MAC X1, Y0, B MAC X0, Y1, B MAC Y1, X1, B

All other Data ALU instructions are executed as NOP’s when the processor is in the Dou- ble Precision Multiply Mode.

Example 1:

:

MPY –X1,Y1,A #$543210,Y0 ;–(X1Y1) A, update Y0

:

X1

Before Execution

$800000

X1

After Execution

$800000

Y1

$C00000

Y1

$C00000

A

$00:000000:000000

A

$FF:C00000:000000

A - 228

INSTRUCTION SET DETAILS

MOTOROLA

Page 497
Image 497
Motorola 24-Bit Digital Signal Processor, DSP56000 manual Mpy Mpy, Signed Multiply Operation