7.2.2. Scalar data and NEON

Scalar data refers to a single value instead of a vector containing multiple values. Some NEON instructions use a scalar operand. A scalar inside a register is accessed by index into the vector of values.

The general array notation to access individual elements of a vector is:

  <Instruction> Vd.Ts[index1], Vn.Ts[index2]

where:

Vd is the destination register.

Vn is the first source register.

Ts is the size specifier for the element.

index is the element index.

As in the following example:

  INS V0.S[1], V1.S[0]

Figure 7.4. Inserting an element into a vector (INS V0.S[1], V1.S[0])

To view this graphic, your browser must support the SVG format. Either install a browser with native support, or install an appropriate plugin such as Adobe SVG Viewer.


In the MOV V0.B[3], W0 instruction, the least significant byte of register W0 is copied into the fourth byte in register V0.

Figure 7.5. Moving a scalar to a lane (MOV V0.B[3], W0)

To view this graphic, your browser must support the SVG format. Either install a browser with native support, or install an appropriate plugin such as Adobe SVG Viewer.


NEON scalars can be 8-bit, 16-bit, 32-bit, or 64-bit values. Other than multiply instructions, instructions that access scalars can access any element in the register file.

Multiply instructions only allow 16-bit or 32-bit scalars, and can only access the first 128 scalars in the register file:

Copyright © 2015 ARM. All rights reserved.ARM DEN0024A
Non-ConfidentialID050815