The STM32 Cortex-M4 instruction set
3.5.22
USAD8
Unsigned Sum of Absolute Differences
Syntax
USAD8{cond}{Rd,} Rn, Rm
Where:
•
'cond' is an optional condition code (see
•
'Rd' is the destination register.
•
'Rn' is the first operand register.
•
'Rm' is the second operand register.
Operation
The USAD8 instruction:
1.
Subtracts each byte of the second operand register from the corresponding byte of the
first operand register.
2.
Adds the absolute values of the differences together.
3.
Writes the result to the destination register.
Restrictions
Do not use either SP or use PC.
Condition flags
These instructions do not change the flags.
Examples
USAD8 R1, R4, R0
USAD8
R0, R5
106/262
Conditional execution on page
; Subtracts each byte in R0 from corresponding byte of
; R4 adds the differences and writes to R1
; Subtracts bytes of R5 from corresponding byte in R0,
; adds the differences and writes to R0.
PM0214 Rev 9
PM0214
65).
Need help?
Do you have a question about the STM32H7 Series and is the answer not in the manual?
Questions and answers