11.07.2015 Views

section 7 - Index of

section 7 - Index of

section 7 - Index of

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

MAC Signed Multiply-Accumulate MACOperation:D±S1 *S2~D (parallel move)Assembler Syntax:MAC (±)S1 ,S2,D (parallel move)D±S1 *S2~D (parallel move)D±(S1 *2-n)~D (no parallel move)MACMAC(±)S2,S1 ,D (parallel move)(±)S,#n,D (no parallel move)Description: Multiply the two signed 24-bit source operands S1 and S2 (or the signed24-bit source operand S by the positive 24-bit immediate operand 2- n ) and add/subtractthe product to/from the specified 56-bit destination accumulator D. The ,,_It sign option isused 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 followinginstructions do not execute in the normal way and should only be used as part <strong>of</strong> thedouble precision multiply algorithm shown in Section 3.4 DOUBLE PRECISION MUL TI­PLY MODE:MPYYO, XO, AMAC X1, YO, AMAC XO, Y1, AMAC Y1, X1, AMPYYO, XO, BMAC X1, YO, BMAC XO, Y1, BMAC Y1, X1, BAll other Data ALU instructions are executed as NaP's when the processor is in the DoublePrecision Multiply Mode.Example 1:MAC XO,XO,A X:(R2)+N2,Y1 ;square XO and store in A, update Y1 and R2Before ExecutionAfter ExecutionXO I $123456 XO I $123456AI$00:100000:00000 AI $00:1296CD:9619C8Explanation <strong>of</strong> Example 1: Prior to execution, the 24-bit XO register contains the value<strong>of</strong> $123456 (0.142222166), and the 56-bit A accumulator contains the value$00:100000:000000 (0.125). The execution <strong>of</strong> the MAC XO,XO,A instruction squares the24-bit signed value in the XO register and adds the resulting 48-bit product to the 56-bit Aaccumulator (XO*XO+IA=0.145227144519197 approximately= $00:1296CD :9619C8=A).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!