3.5.22. USAD8

Unsigned Sum of Absolute Differences.

Syntax

USAD8{cond} {Rd,} Rn, Rm

Where:

cond

Is an optional condition code. See Conditional execution.

Rd

Is the destination register. If Rd is omitted, the destination register is Rn.

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 SP and do not use PC.

Condition flags

These instructions do not change the flags.

Examples

USAD8 R1, R4, R0      ; Subtracts each byte in R0 from corresponding byte of R4
                      ; adds the differences and writes to R1.
USAD8  R0, R5         ; Subtracts bytes of R5 from corresponding byte in R0, 
                      ; adds the differences and writes to R0.
Copyright © 2015, 2018 Arm. All rights reserved.ARM DUI 0646C
Non-ConfidentialID121118