Page 371 - ARM 64 Bit Assembly Language
P. 371
Advanced SIMD instructions 361
10.6.9.1 Syntax
(s|u)qadd Fd, Fn, Fm
(s|u)qsub Fd, Fn, Fm
sq{r}dmulh <Fx>d, <Fx>n, <Fx>m
(s|u)q{r}shl Fd, Fn, Fm
• F is b, h, sd.
• <Fx> is h or s.
10.6.9.2 Operations
Name Effect Description
xqadd Fd ← Fn + Fm Add Fm to Fn, saturate, and store the
result in Fd.
xqsub Fd ← Fn + Fm Subtract Fm from Fn, saturate, and
store the result in Fd.
sqrdmulh Fd ← (Fn + Fm) n Multiply Fm from Fn, saturate, op-
tionally round, and store the upper
half of the result in Fd.
xqrshl Fd ← Fn Fm Shift Fn left or right by Fm, option-
ally rounding, saturate, and store the
result in Fd.
10.6.9.3 Examples
1 sqadd b0,b1,b2 // Add two bytes
2 sqrdmulh h1,h5,h6 // Multiply two 16 bit integers and
3 // store the upper 16 bits.
10.7 Multiplication and division
There is no integer divide instruction in Advanced SIMD. Integer division is accomplished
with multiplication by the reciprocal, as was described in Chapter 7 and Chapter 8. For divi-
sion by a constant, the constant reciprocal can be computed in advance, and simply loaded
into a register. For division by a variable, special instructions are provided for computing the
reciprocal.

