| |||
| Home > NEON and VFP Programming > NEON shift instructions > VSHL, VQSHL, VQSHLU, and VSHLL (by immediate) | |||
Vector Shift Left (by immediate) instructions take each element in a vector of integers, left shift them by an immediate value, and place the results in the destination vector.
For VSHL (Vector Shift Left), bits shifted out
of the left of each element are lost.
For VQSHL (Vector Saturating Shift Left) and VQSHLU (Vector
Saturating Shift Left Unsigned), the sticky QC flag (FPSCR bit[27])
is set if saturation occurs.
For VSHLL (Vector Shift Left Long), values are
sign or zero extended.
V{Q}SHL{U}{cond}.datatype {Qd}, Qm, #imm
V{Q}SHL{U}{cond}.datatype {Dd}, Dm, #imm
VSHLL{cond}.datatype Qd, Dm, #imm
where:
Qif present, indicates that if any of the results overflow, they are saturated.
Uonly permitted if Q is also present. Indicates that the results are unsigned even though the operands are signed.
condis an optional condition code.
datatypemust be one of:
I8, I16, I32, I64for VSHL
S8, S16, S32for VSHLL, VQSHL, or VQSHLU
U8, U16, U32for VSHLL or VQSHL
S64for VQSHL or VQSHLU
U64for VQSHL.
Qd, Qmare the destination and operand vectors, for a quadword operation.
Dd, Dmare the destination and operand vectors, for a doubleword operation.
Qd, Dmare the destination and operand vectors, for a long operation.
immis the immediate value specifying the size of the shift, in the range:
1 to size()
for datatypeVSHLL
1 to (size()
- 1) for datatypeVSHL, VQSHL, or VQSHLU.
0 is permitted, but the resulting code disassembles to VMOV or VMOVL.