Renesas Electronics
MAX
Selecting the highest value
MAXimum value select
[Syntax]
MAX src, dest
[Operation]
if ( src > dest )
dest = src;
[Function]
-
This instruction compares src and dest as signed values and places whichever is greater in dest.
[Instruction Format]
Syntax
Processng Size
src
dest
Code size
(Byte)
L
#SIMM:8
Rd
4
#SIMM:16
5
#SIMM:24
6
#IMM:32
7
Rs
3
[Rs].memex
3 (memex == UB)
4 (memex != UB)
dsp:8[Rs].memex
4 (memex == UB)
5 (memex != UB)
dsp:16[Rs].memex
5 (memex == UB)
6 (memex != UB)
[Flag Change]
This instruction does not affect the states of flags.
[Description Example]
MAX #10, R2
MAX R1, R2
MAX [R1], R2
MAX 3[R1].B, R2