Chapter 16
Appendix
XVI - 64
Extension Instruction Specification
MCST (8-, 16- and 32-bit saturation instructions for multiply and accumulate result)
[Instruction format (macro name)]
MCST32, MCST16, MCST8
[Assembler mnemonic]
udf02 Dm, Dn
udf02 imm8, Dn
: Only 0x20, 0x10 and 0x08 of the imm8 value are valid
[Operation]
This instruction places the content of the multiply and accumulate overflow detection flag register MCVF in the V
flag. Note also that the instruction performs the following depending on the Dm value:
1. When Dm is 32 (0x00000020)
This instruction stores the 32-bit signed positive maximum value (0x7fffffff) and the 32-bit signed negative
maximum value (0x80000000) in Dn respectively when the 64-bit multiply and accumulate result, stored in
the multiply and accumulate registers MCRH and MCRL, is equal to or greater than the positive maximum
value (0x000000007fffffff) and equal to or smaller than the negative maximum value (0xffffffff80000000).
In any other case, the instruction stores the content of MCRL in Dn.
2. When Dm is 16 (0x00000010)
This instruction stores the 16-bit signed positive maximum value (0x00007fff ) and the 16-bit signed negative
maximum value (0xffff8000) in Dn respectively when the 64-bit multiply and accumulate result, stored in the
multiply and accumulate registers MCRH and MCRL, is equal to or greater than the positive maximum value
(0x0000000000007fff) and equal to or smaller than the negative maximum value (0xffffffffffff8000). In any
other case, the instruction stores the content of MCRL in Dn.
3. When Dm is 8 (0x00000008)
This instruction stores the positive maximum value (0x7f) and the negative maximum value (0x80) in Dn
respectively when the 32-bit multiply and accumulate result, stored in the multiply and accumulate register
MCRL, is equal to or greater than the 8-bit signed positive maximum value (0x0000007f) and equal to or
smaller than the 8-bit signed negative maximum value (0xffffff80). In any other case, the instruction stores the
content of MCRL in Dn.
4. When Dm is any other value
The value in Dn is undefined.
[Flag changes]
When multiply and accumulate overflow is not detected (MCVF = 0)
When multiply and accumulate overflow is detected (MCVF = 1)
[Note for programming]
Updating of the PSW as a result of flag changes is delayed by 1 instruction.
Note, however, that flags can be evaluated for the Bcc and Lcc instructions before flag changes are reflected in the
PSW.
Flag
Change
Condition
V
0
Indicates that multiply and accumulate operation is valid.
C
0
Always "0".
N
*
Undefined
Z
*
Undefined
Flag
Change
Condition
V
1
Indicates that multiply and accumulate operation is invalid.
C
0
Always "0".
N
*
Undefined
Z
*
Undefined