Uqadd And Uqsub - ARM Cortex-M4 Generic User Manual

Table of Contents

Advertisement

3.7.7

UQADD and UQSUB

ARM DUI 0553A
ID121610
Saturating Add and Saturating Subtract Unsigned.
Syntax
op{cond} {Rd}, Rn, Rm
op{cond} {Rd}, Rn, Rm
where:
Is one of:
op
Saturating four unsigned 8-bit integer additions.
UQADD8
Saturating two unsigned 16-bit integer additions.
UQADD16
Saturating four unsigned 8-bit integer subtractions.
UDSUB8
Saturating two unsigned 16-bit integer subtractions.
UQSUB16
Is an optional condition code, see
cond
Specifies the destination register.
Rd
Are registers holding the first and second operands.
Rn, Rm
Operation
These instructions add or subtract two or four values and then writes an unsigned saturated value
in the destination register.
The
instruction:
UQADD16
Adds the respective top and bottom halfwords of the first and second operands.
Saturates the result of the additions for each halfword in the destination register to the
unsigned range 0 ≤ x ≤ 2
The
instruction:
UQADD8
Adds each respective byte of the first and second operands.
Saturates the result of the addition for each byte in the destination register to the unsigned
8
range 0 ≤ x ≤ 2
−1, where x is 8.
The
instruction:
UQSUB16
Subtracts both halfwords of the second operand from the respective halfwords of the first
operand.
Saturates the result of the differences in the destination register to the unsigned range
0 ≤ x ≤ 2
16
−1, where x is 16.
The
instructions:
UQSUB8
Subtracts the respective bytes of the second operand from the respective bytes of the first
operand.
Saturates the results of the differences for each byte in the destination register to the
unsigned range 0 ≤ x ≤ 2
Restrictions
Do not use SP and do not use PC
Copyright © 2010 ARM. All rights reserved.
Non-Confidential
Conditional execution on page
16
−1, where x is 16.
8
−1, where x is 8.
.
The Cortex-M4 Instruction Set
3-18.
3-105

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Cortex-M4 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF