beautypg.com

3 muls/mulu, 4 scale factor in mac or msac instructions, 2 emac instruction set summary – Motorola ColdFire MCF5281 User Manual

Page 90: 2 emac instruction set summary -12

background image

Enhanced Multiply-Accumulate Unit (EMAC)

3-12

Freescale Semiconductor

movem.l (a7),#0x00ff

; restore the state from memory

move.l #0,macsr

; disable rounding in the macsr

move.l d0,acc0

; restore the accumulators

move.l d1,acc1

move.l d2,acc2

move.l d3,acc3

move.l d4,accext01

; restore the accumulator extensions

move.l d5,accext23

move.l d6,mask

; restore the address mask

move.l d7,macsr

; restore the macsr

Executing this sequence type can correctly save and restore the exact state of the EMAC programming
model.

3.3.1.3

MULS/MULU

MULS and MULU are unaffected by fractional-mode operation; operands remain assumed to be integers.

3.3.1.4

Scale Factor in MAC or MSAC Instructions

The scale factor is ignored while the MAC is in fractional mode.

3.3.2

EMAC Instruction Set Summary

Table 3-8

summarizes EMAC unit instructions.

Table 3-8. EMAC Instruction Summary

Command

Mnemonic

Description

Multiply Signed

muls y,Dx

Multiplies two signed operands yielding a signed result

Multiply Unsigned

mulu y,Dx

Multiplies two unsigned operands yielding an unsigned result

Multiply Accumulate

mac Ry,RxSF,ACCx

msac Ry,RxSF,ACCx

Multiplies two operands and adds/subtracts the product
to/from an accumulator

Multiply Accumulate
with Load

mac Ry,Rx,y,Rw,ACCx

msac Ry,Rx,y,Rw,ACCx

Multiplies two operands and combines the product to an
accumulator while loading a register with the memory operand

Load Accumulator

move.l {Ry,#imm},ACCx

Loads an accumulator with a 32-bit operand

Store Accumulator

move.l ACCx,Rx

Writes the contents of an accumulator to a CPU register

Copy Accumulator

move.l ACCy,ACCx

Copies a 48-bit accumulator

Load MACSR

move.l {Ry,#imm},MACSR

Writes a value to MACSR

Store MACSR

move.l MACSR,Rx

Write the contents of MACSR to a CPU register

Store MACSR to CCR

move.l MACSR,CCR

Write the contents of MACSR to the CCR

Load MAC Mask Reg

move.l {Ry,#imm},MASK

Writes a value to the MASK register

Store MAC Mask Reg

move.l MASK,Rx

Writes the contents of the MASK to a CPU register

Load Accumulator
Extensions 01

move.l {Ry,#imm},ACCext01

Loads the accumulator 0,1 extension bytes with a 32-bit
operand

MCF5282 and MCF5216 ColdFire Microcontroller User’s Manual, Rev. 3

This manual is related to the following products: