beautypg.com

Fmpy//faddsub.s, Fmpy//faddsub.s floating-point, Multiply, add, and subtract – Motorola DSP96002 User Manual

Page 330

background image

A - 142

DSP96002 USER’S MANUAL

MOTOROLA

FMPY//FADDSUB.S

FMPY//FADDSUB.S

Floating-Point

Multiply, Add, and Subtract

Operation:

S1 * S2

ROUND(MP)

D1

(parallel data bus move)

D3 + D2

ROUND(SP)

D2

D3 - D2

ROUND(SP)

D3

Assembler Syntax:

FMPY S1,S2,D1 FADDSUB.S D3,D2

(move syntax - see the MOVE instruction descrip-

tion.)

FMPY S2,S1,D1 FADDSUB.S D3,D2

(move syntax - see the MOVE instruction descrip-

tion.)

Description:

Multiply the two operands S1 and S2, round to the precision indicated by the MP mode bit and store the

result in the specified destination register D1. Simultaneously, add the two operands D2 and D3, subtract

D2 from D3, round both results to single precision and store the result of the addition in register D2 and

of the subtraction in register D3. Typically, if the result of the multiplication will be used immediately follow-

ing a data ALU instruction such as FADD (i.e., equivalent to an FMAC), the maximum precision (MP=1) will

be programmed. However, if the product is to be stored, then single precision (MP=0) rounding will be used.

For the special case of |s|=|D|, the result can be +0 or -0; the sign of the resulting zero will be the sign of

the input operand in D.

Input Operand(s) Precision: SEP Floating-Point.

Addition Output Operand Precision: SP Floating-Point.

Subtraction Output Operand Precision: SP Floating-Point.

Multiplication Output Operand Precision: as indicated by MP.

CCR Condition Codes:

C

- Not affected.

V

- Not affected.

Z

- Set if result of the addition is zero. Cleared otherwise.

N

- Set if result of the addition is negative. Cleared otherwise.

I

- Set if result of the addition is infinity. Cleared otherwise.

LR

- Not affected.

R

- Not affected.

A

- Not affected.