vsli
Vector Shift Left and Insert
Shifts bits left and inserts into destination (merging).
Pseudocode Operation
for i = 0 to elements_in_Qd - 1
shift_amount ← imm6
shifted ← Qm[i] << shift_amount
mask ← (1 << shift_amount) - 1
Qd[i] ← (Qd[i] & ~mask) | (shifted & mask)
endfor
Example
Encoding
Operands
-
Qd
Destination 128-bit SIMD register -
Qm
Second source 128-bit SIMD register -
imm
Signed immediate value
Related
More in NEON (SIMD)
Reference
Instruction Forms
| Encoding | Instruction | ISA | Bit pattern | ||
|---|---|---|---|---|---|
| 0xF3800510 | VSLI{<c>}{<q>}.<size> {<Dd>,} <Dm>, #<imm> | A32 | 1111001 | 1 | 1 | D | imm6 | Vd | 0101 | L | 0 | M | 1 | Vm | ||
| 0xF3800550 | VSLI{<c>}{<q>}.<size> {<Qd>,} <Qm>, #<imm> | A32 | 1111001 | 1 | 1 | D | imm6 | Vd | 0101 | L | 1 | M | 1 | Vm | ||
| 0xFF800510 | VSLI{<c>}{<q>}.<size> {<Dd>,} <Dm>, #<imm> | T32 | 111 | 1 | 11111 | D | imm6 | Vd | 0101 | L | 0 | M | 1 | Vm | ||
| 0xFF800550 | VSLI{<c>}{<q>}.<size> {<Qd>,} <Qm>, #<imm> | T32 | 111 | 1 | 11111 | D | imm6 | Vd | 0101 | L | 1 | M | 1 | Vm |
Description
Vector Shift Left and Insert takes each element in the operand vector, left shifts them by an immediate value, and inserts the results in the destination vector. Bits shifted out of the left of each element are lost. The elements must all be the same size, and can be 8-bit, 16-bit, 32-bit, or 64-bit. There is no distinction between data types. Depending on settings in the CPACR, NSACR, and HCPTR registers, and the Security state and PE mode in which the instruction is executed, an attempt to execute the instruction might be undefined, or trapped to Hyp mode. For more information see Enabling Advanced SIMD and floating-point support.
Operation
if ConditionPassed() then
EncodingSpecificOperations(); CheckAdvSIMDEnabled();
mask = LSL(Ones(esize), shift_amount);
for r = 0 to regs-1
for e = 0 to elements-1
shifted_op = LSL(Elem[D[m+r],e,esize], shift_amount);
Elem[D[d+r],e,esize] = (Elem[D[d+r],e,esize] AND NOT(mask)) OR shifted_op;