Signed Multiply Accumulate Long Dual, Signed Multiply Accumulate Long Dual exchange.

#### Syntax

````op`{X}{`cond`} `Rd`,` Rn`, `Rm`, `Ra`
```

Where:

`op`

Is one of:

`SMLAD`

Signed Multiply Accumulate Long Dual.

`SMLADX`

Signed Multiply Accumulate Long Dual exchange.

`X` specifies which halfword of the source register `Rn` is used as the multiply operand.

If `X` is omitted, the multiplications are bottom `×` bottom and top `×` top.

If `X` is present, the multiplications are bottom `×` top and top `×` bottom.

`cond`

Is an optional condition code. See Conditional execution.

`Rd`

Is the destination register.

`Rn`

Is the first operand register holding the values to be multiplied.

`Rm`

Is the second operand register.

`Ra`

Is the accumulate value.

#### Operation

The `SMLAD` and `SMLADX` instructions regard the two operands as four halfword 16-bit values.

The `SMLAD` instruction:

1. Multiplies the top signed halfword value in `Rn` with the top signed halfword of `Rm` and the bottom signed halfword value in `Rn` with the bottom signed halfword of `Rm`.

2. Adds both multiplication results to the signed 32-bit value in `Ra`.

3. Writes the 32-bit signed result of the multiplication and addition to `Rd`.

The `SMLADX` instruction:

1. Multiplies the top signed halfword value in `Rn` with the bottom signed halfword of `Rm` and the bottom signed halfword value in `Rn` with the top signed halfword of `Rm`.

2. Adds both multiplication results to the signed 32-bit value in `Ra`.

3. Writes the 32-bit signed result of the multiplication and addition to `Rd`.

#### Restrictions

Do not use SP and do not use PC.

#### Condition flags

Sets the Q flag if the accumulate operation overflows.

#### Examples

```SMLAD   R10, R2, R1, R5 ; Multiplies two halfword values in R2 with
```
```                        ; corresponding halfwords in R1, adds R5 and writes to
; R10.
```
```SMLALDX R0, R2, R4, R6  ; Multiplies top halfword of R2 with bottom halfword
```
```                        ; of R4, multiplies bottom halfword of R2 with top
```
```                        ; halfword of R4, adds R6 and writes to R0.
```
 Copyright © 2015, 2018 Arm. All rights reserved. ARM DUI 0646C Non-Confidential ID121118 PDF version