SIMD ISAReturn TypeNameArgumentsInstruction Group
Neonuint16x8_tvsubhn_high_u32(uint16x4_t r, uint32x4_t a, uint32x4_t b)Vector arithmetic / Subtract / Narrowing subtraction
Description
Subtract returning High Narrow. This instruction subtracts each vector element in the second source SIMD&FP register from the corresponding vector element in the first source SIMD&FP register, places the most significant half of the result into a vector, and writes the vector to the lower or upper half of the destination SIMD&FP register. All the values in this instruction are signed integer values.
Results
Vd.8H result
This intrinsic compiles to the following instructions:

SUBHN2 Vd.8H,Vn.4S,Vm.4S

Argument Preparation
r register: Vd.4Ha register: Vn.4Sb register: Vm.4S
Architectures
A64

Operation

CheckFPAdvSIMDEnabled64();
bits(2*datasize) operand1 = V[n];
bits(2*datasize) operand2 = V[m];
bits(datasize)   result;
integer round_const = if round then 1 << (esize - 1) else 0;
bits(2*esize) element1;
bits(2*esize) element2;
bits(2*esize) sum;

for e = 0 to elements-1
    element1 = Elem[operand1, e, 2*esize];
    element2 = Elem[operand2, e, 2*esize];
    if sub_op then
        sum = element1 - element2;
    else
        sum = element1 + element2;
    sum = sum + round_const;
    Elem[result, e, esize] = sum<2*esize-1:esize>;

Vpart[d, part] = result;