SIMD ISAReturn TypeNameArgumentsInstruction Group
Neonuint16x8_tvqshrun_high_n_s32(uint16x4_t r, int32x4_t a, const int n)Shift / Right / Vector saturating shift right and narrow
Description
Signed saturating Shift Right Unsigned Narrow (immediate). This instruction reads each signed integer value in the vector of the source SIMD&FP register, right shifts each value by an immediate value, saturates the result to an unsigned integer value that is half the original width, places the final result into a vector, and writes the vector to the destination SIMD&FP register. The results are truncated. For rounded results, see SQRSHRUN.
Results
Vd.8H result
This intrinsic compiles to the following instructions:

SQSHRUN2 Vd.8H,Vn.4S,#n

Argument Preparation
r register: Vd.4Ha register: Vn.4Sn minimum: 1; maximum: 16
Architectures
A64

Operation

CheckFPAdvSIMDEnabled64();
bits(datasize*2) operand = V[n];
bits(datasize) result;
integer round_const = if round then (1 << (shift - 1)) else 0;
integer element;
boolean sat;

for e = 0 to elements-1
    element = (SInt(Elem[operand, e, 2*esize]) + round_const) >> shift;
    (Elem[result, e, esize], sat) = UnsignedSatQ(element, esize);
    if sat then FPSR.QC = '1';

Vpart[d, part] = result;