158
11100B–ATARM–31-Jul-12
SAM4S Series [Preliminary]
• 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
8
-1, where x is 8.
Restrictions
Do not use SP and do not use PC
.
Condition Flags
These instructions do not affect the condition code flags.
Examples
UQADD16
R7, R4, R2
; Adds halfwords in R4 to corresponding halfword in R2,
; saturates to 16 bits, writes to corresponding
; halfword of R7
UQADD8
R4, R2, R5
; Adds bytes of R2 to corresponding byte of R5,
; saturates to 8 bits, writes to corresponding bytes of
; R4
UQSUB16
R6, R3, R0
; Subtracts halfwords in R0 from corresponding halfword
; in R3, saturates to 16 bits, writes to corresponding
; halfword in R6
UQSUB8
R1, R5, R6
; Subtracts bytes in R6 from corresponding byte of R5,
; saturates to 8 bits, writes to corresponding byte of
; R1.
11.6.8
Packing and Unpacking Instructions
The table below shows the instructions that operate on packing and unpacking data:
Table 11-23. Packing and Unpacking Instructions
Mnemonic
Description
PKH
Pack Halfword
SXTAB
Extend 8 bits to 32 and add
SXTAB16
Dual extend 8 bits to 16 and add
SXTAH
Extend 16 bits to 32 and add
SXTB
Sign extend a byte
SXTB16
Dual extend 8 bits to 16 and add
SXTH
Sign extend a halfword
UXTAB
Extend 8 bits to 32 and add
UXTAB16
Dual extend 8 bits to 16 and add
UXTAH
Extend 16 bits to 32 and add
UXTB
Zero extend a byte
UXTB16
Dual zero extend 8 bits to 16 and add
UXTH
Zero extend a halfword
Содержание SAM4S Series
Страница 44: ...44 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Страница 412: ...412 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Страница 1105: ...1105 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Страница 1142: ...1142 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 3 100 ball VFBGA Package Drawing ...
Страница 1143: ...1143 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 4 64 lead LQFP Package Drawing ...
Страница 1145: ...1145 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 5 64 lead QFN Package Drawing ...