Multiply-Accumulate Unit (MAC)
MCF52211 ColdFire® Integrated Microcontroller Reference Manual, Rev. 2
4-14 Freescale Semiconductor
then {if (inst == MSAC)
then result[31:0] = acc[31:0] - product[31:0]
else result[31:0] = acc[31:0] + product[31:0]
}
/* check for accumulation overflow */
if (accumulationOverflow == 1)
then {MACSR.V = 1
if (inst == MSAC && MACSR.OMC == 1)
then result[31:0] = 0x0000_0000
else if (MACSR.OMC == 1)
then /* overflowed MAC,
saturationMode enabled */
result[31:0] = 0xffff_ffff
}
/* transfer the result to the accumulator */
acc[31:0] = result[31:0]
MACSR.N = result[31]
if (result[31:0] == 0x0000_0000)
then MACSR.Z = 1
else MACSR.Z = 0
}
break;}