You copied the Doc URL to your clipboard.

ARM Compiler armasm User Guide : QADD

QADD

Signed saturating addition.

Syntax

QADD{cond} {Rd}, Rm, Rn

where:

cond

is an optional condition code.

Rd

is the destination register.

Rm, Rn

are the registers holding the operands.

Operation

The QADD instruction adds the values in Rm and Rn. It saturates the result to the signed range –231x ≤ 231–1.

Note

All values are treated as two’s complement signed integers by this instruction.

Register restrictions

You cannot use PC for any operand.

You can use SP in A32 instructions but this is deprecated. You cannot use SP in T32 instructions.

Q flag

If saturation occurs, this instruction sets the Q flag. To read the state of the Q flag, use an MRS instruction.

Availability

The 32-bit instruction is available in A32 and T32.

For the ARMv7-M architecture, the 32-bit T32 instruction is only available in an ARMv7E-M implementation.

There is no 16-bit version of this instruction in T32.

Example

    QADD    r0, r1, r9
Was this page helpful? Yes No