SIMD ISAReturn TypeNameArgumentsInstruction Group
Neonint8x16_tvrsubhn_high_s16(int8x8_t r, int16x8_t a, int16x8_t b)Vector arithmetic / Subtract / Narrowing subtraction
Description
Rounding Subtract returning High Narrow. This instruction subtracts each vector element of the second source SIMD&FP register from the corresponding vector element of 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.
Results
Vd.16B result
This intrinsic compiles to the following instructions:

RSUBHN2 Vd.16B,Vn.8H,Vm.8H

Argument Preparation
r register: Vd.8Ba register: Vn.8Hb register: Vm.8H
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;