108
32000D–04/2011
AVR32
9.3.4
DSP Operations
Table 9-4.
DSP Operations
Mnemonics
Operands / Syntax
Description
Operation
Rev
addhh.w
E
Rd, Rx:<part>,
Ry:<part>
Add signed halfwords.
(32
← 16 +16)
Rd
← SE(Rx:<part>) +
SE(Ry:<part>)
1
machh.d
E
Rd, Rx:<part>,
Ry:<part>
Multiply signed halfwords and
accumulate.
(48
← 16x16 + 48)
Rd+1:Rd
← Rx:<part> * Ry:<part>
+ Rd+1:Rd
1
machh.w
E
Rd, Rx:<part>,
Ry:<part>
Multiply signed halfwords and
accumulate.
(32
← 16x16 + 32)
Rd
← Rx:<part> * Ry:<part> + Rd
1
macwh.d
E
Rd, Rx, Ry:<part>
Multiply signed word and halfword and
accumulate.
(48
← 32x16 + 48)
Rd+1:Rd
← ((Rx * Ry:<part>)
<<16) + Rd+1:Rd
1
mulhh.w
E
Rd, Rx:<part>,
Ry:<part>
Signed Multiply of halfwords.
(32
← 16 x 16)
Rd
← Rx:<part> * Ry:<part>
1
mulwh.d
E
Rd, Rx, Ry:<part>
Unsigned Multiply, word and halfword.
48
← (32 x 16)
Rd+1:Rd
← ((Rx * Ry:<part>)
<<16)
1
mulnhh.w
E
Rd, Rx:<part>,
Ry:<part>
Signed Multiply of halfwords.
(32
← 16 x 16)
Rd
← Rx:<part> * (- Ry:<part>)
1
mulnwh.d
E
Rd, Rx, Ry:<part>
Signed Multiply, word and negated
halfword.
48
← (32 x 16)
Rd+1:Rd
← ((Rx * (- Ry:<part>))
<< 16)
1
satadd.h
E
Rd, Rx, Ry
Saturated add halfwords.
Rd
← SE(Sat(Rx[15:0] +
Ry[15:0]))
1
satadd.w
E
Rd, Rx, Ry
Saturated add.
Rd
← Sat(Rx + Ry)
1
satsub.h
E
Rd, Rx, Ry
Saturated subtract halfwords.
Rd
← SE(Sat(Rx[15:0] - Ry[15:0]))
1
satsub.w
E
Rd, Rx, Ry
Saturated subtract.
Rd
← Sat(Rx - Ry)
1
E
Rd, Rs, imm
Rd
← Sat(Rs - SE(imm16) )
1
satrnds
E
Rd >> sa, bp
Signed saturate from bit given by sa5 after
a right shift with rounding of bp5 bit
positions.
Rd
← Sat(Round((Rd >> sa5)),
bp5)
1
satrndu
E
Rd >> sa, bp
Unsigned saturate from bit given by sa5
after a right shift with rounding of bp5 bit
positions.
Rd
← Sat(Round((Rd >> sa5)),
bp5)
1
sats
E
Rd >> sa, bp
Signed saturate from bit given by sa5 after
a right shift of bp5 bit positions.
Rd
← Sat((Rd >> sa5), bp5)
1
satu
E
Rd >> sa, bp
Unsigned saturate from bit given by sa5
after a right shift of bp5 bit positions.
Rd
← Sat((Rd >> sa5),bp5)
1
subhh.w
E
Rd, Rx:<part>,
Ry:<part>
Subtract signed halfwords.
(32
← 16 -16)
Rd
← SE(Rx:<part>) -
SE(Ry:<part>)
1