vaba
Vector Absolute Difference and Accumulate
VABA<c>.<dt> <Qd>, <Qn>, <Qm>
Computes absolute difference and adds to accumulator.
Pseudocode Operation
for i = 0 to num_elements(Qd, dt) - 1
diff ← abs(Qn[i] - Qm[i])
Qd[i] ← Qd[i] + diff
Example
VABA.dt q0, q1, q2
Encoding
Binary Layout
1111001
31:25
U
24
0
23
D
22
size
21:20
Vn
19:16
Vd
15:12
0111
11:8
N
7
0
6
M
5
1
4
Vm
3:0
Operands
-
Qd
Dest/Acc -
Qn
First source 128-bit SIMD register -
Qm
Second source 128-bit SIMD register
Related
More in NEON (SIMD)
Reference
View in Arm A64 ISA Reference ↗
Arm AArch32 ISA
Instruction Forms
| Encoding | Instruction | ISA | Bit pattern | ||
|---|---|---|---|---|---|
| 0xF2000710 | VABA{<c>}{<q>}.<dt> <Dd>, <Dn>, <Dm> | A32 | 1111001 | U | 0 | D | size | Vn | Vd | 0111 | N | 0 | M | 1 | Vm | ||
| 0xF2000750 | VABA{<c>}{<q>}.<dt> <Qd>, <Qn>, <Qm> | A32 | 1111001 | U | 0 | D | size | Vn | Vd | 0111 | N | 1 | M | 1 | Vm | ||
| 0xEF000710 | VABA{<c>}{<q>}.<dt> <Dd>, <Dn>, <Dm> | T32 | 111 | U | 11110 | D | size | Vn | Vd | 0111 | N | 0 | M | 1 | Vm | ||
| 0xEF000750 | VABA{<c>}{<q>}.<dt> <Qd>, <Qn>, <Qm> | T32 | 111 | U | 11110 | D | size | Vn | Vd | 0111 | N | 1 | M | 1 | Vm |
Description
Vector Absolute Difference and Accumulate subtracts the elements of one vector from the corresponding elements of another vector, and accumulates the absolute values of the results into the elements of the destination vector. Operand and result elements are all integers of the same length. 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();
for r = 0 to regs-1
for e = 0 to elements-1
op1 = Elem[Din[n+r],e,esize];
op2 = Elem[Din[m+r],e,esize];
absdiff = Abs(Int(op1,unsigned) - Int(op2,unsigned));
if long_destination then
Elem[Q[d>>1],e,2*esize] = Elem[Qin[d>>1],e,2*esize] + absdiff;
else
Elem[D[d+r],e,esize] = Elem[Din[d+r],e,esize] + absdiff;