Motorola ColdFire MCF5281 User Manual page 122

Motorola microcontroller user's manual
Table of Contents

Advertisement

EMAC Instruction Set Summary
then {
MACSR.PAVx = 0
/* select the input operands */
if (sz == word)
/* perform the multiply */
product[63:0] = operandY[31:0] * operandX[31:0]
/* check for product overflow */
if (product[63:40] != 0x0000_00)
/* zero-fill to 48 bits before performing any scaling */
/* scale product before combining with accumulator */
switch (SF)
{
}
/* combine with accumulator */
if (MACSR.PAVx == 0)
3-18
then {if (U/Ly == 1)
then operandY[31:0] = {0x0000, Ry[31:16]}
else operandY[31:0] = {0x0000, Ry[15:0]}
if (U/Lx == 1)
then operandX[31:0] = {0x0000, Rx[31:16]}
else operandX[31:0] = {0x0000, Rx[15:0]}
}
else {operandY[31:0] = Ry[31:0]
operandX[31:0] = Rx[31:0]
}
then {
/* product overflow */
MACSR.PAVx = 1
MACSR.V = 1
if (inst == MSAC && MACSR.OMC == 1)
then result[47:0] = 0x0000_0000_0000
else if (MACSR.OMC == 1)
then /* overflowed MAC,
}
product[47:40] = 0
/* 2-bit scale factor */
case 0:
/* no scaling specified */
break;
case 1:
/* SF = "<< 1" */
product[40:0] = {product[39:0], 0}
break;
case 2:
/* reserved encoding */
break;
case 3:
/* SF = ">> 1" */
product[39:0] = {0, product[39:1]}
break;
then {if (inst == MSAC)
then result[47:0] = ACCx[47:0] - product[47:0]
else result[47:0] = ACCx[47:0] + product[47:0]
MCF5282 User's Manual
saturationMode enabled */
result[47:0] = 0xffff_ffff_ffff
/* zero-fill upper byte */
MOTOROLA

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfire mcf5282

Table of Contents