section 7 - Index of

section 7 - Index of section 7 - Index of

11.07.2015 Views

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 of 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 of Example 1: Prior to execution, the 24-bit XO register contains the valueof $123456 (0.142222166), and the 56-bit A accumulator contains the value$00:100000:000000 (0.125). The execution of 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).

MAC Signed Multiply-Accumulate MACCondition Codes:S -L -E -U -N -Z -V -I LF I DM I T I ** I SI I SO I 1115 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0I 10 I s I LIE I u I N I z I v I c I.• MR .,.. CCR .,.Computed according to the definition in A.5 CONDITION CODE COMPUTATION.Set if limiting (parallel move) or overflow has occurred in resultSet if the signed integer portion of A or B result is in useSet if A or B result is unnormalizedSet if bit 55 of A or B result is setSet if A or B result equals zeroSet if overflow has occurred in A or B resultNote: The definitions of the E and U bits vary according to the scaling mode being used.Refer to Section A.5 for complete details.Instruction Format 1:MAC (±)S 1 ,S2,DMAC (±)S2,S1,DOpcode: 123 8 7 4 3DATA BUS MOVE FIELD 11 a a aid kooOPTIONAL EFFECTIVE ADDRESS EXTENSIONInstruction Fields:81*82 Q Q Q Sign k D dXOXO 0 0 0 + 0 A 0YO YO 0 0 1 1 B 1X1 XO 0 1 0Y1 YO 0 1 1XOY1 1 0 0YOXO 1 0 1X1 YO 1 1 0Y1 X1 1 1 1Note: Only the indicated S1 *S2 combinations are valid. X1 *X1 and Y1 *Y1 are not valid.

MAC Signed Multiply-Accumulate MACCondition Codes:S -L -E -U -N -Z -V -I LF I DM I T I ** I SI I SO I 1115 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0I 10 I s I LIE I u I N I z I v I c I.• MR .,.. CCR .,.Computed according to the definition in A.5 CONDITION CODE COMPUTATION.Set if limiting (parallel move) or overflow has occurred in resultSet if the signed integer portion <strong>of</strong> A or B result is in useSet if A or B result is unnormalizedSet if bit 55 <strong>of</strong> A or B result is setSet if A or B result equals zeroSet if overflow has occurred in A or B resultNote: The definitions <strong>of</strong> the E and U bits vary according to the scaling mode being used.Refer to Section A.5 for complete details.Instruction Format 1:MAC (±)S 1 ,S2,DMAC (±)S2,S1,DOpcode: 123 8 7 4 3DATA BUS MOVE FIELD 11 a a aid kooOPTIONAL EFFECTIVE ADDRESS EXTENSIONInstruction Fields:81*82 Q Q Q Sign k D dXOXO 0 0 0 + 0 A 0YO YO 0 0 1 1 B 1X1 XO 0 1 0Y1 YO 0 1 1XOY1 1 0 0YOXO 1 0 1X1 YO 1 1 0Y1 X1 1 1 1Note: Only the indicated S1 *S2 combinations are valid. X1 *X1 and Y1 *Y1 are not valid.

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

Saved successfully!

Ooh no, something went wrong!