bif
Bitwise Insert if False
BIF <Vd>.<T>, <Vn>.<T>, <Vm>.<T>
Inserts bits from Vn into Vd where Vm (mask) is 0.
Pseudocode Operation
for i = 0 to (datasize / 8) - 1
Vd[i*8 +: 8] ← (Vd[i*8 +: 8] & Vm[i*8 +: 8]) | (Vn[i*8 +: 8] & ~Vm[i*8 +: 8])
Example
BIF v0.4s.T, v1.4s.T, v2.4s.T
Encoding
Binary Layout
0
31
Q
30
1
29
01110
28:24
11
23:22
1
21
Rm
20:16
00011
15:11
1
10
Rn
9:5
Rd
4:0
Operands
-
Vd
Destination SIMD/FP vector register -
Vn
First source SIMD/FP vector register -
Vm
Mask
Related
More in NEON (SIMD)
Reference
View in Arm A64 ISA Reference ↗
Arm A64 ISA
Instruction Forms
| Encoding | Instruction | ISA | Bit pattern | ||
|---|---|---|---|---|---|
| 0x2EE01C00 | BIF <Vd>.<T>, <Vn>.<T>, <Vm>.<T> | A64 | 0 | Q | 1 | 01110 | 11 | 1 | Rm | 00011 | 1 | Rn | Rd |
Description
Bitwise Insert if False. This instruction inserts each bit from the first source SIMD&FP register into the destination SIMD&FP register if the corresponding bit of the second source SIMD&FP register is 0, otherwise leaves the bit in the destination register unchanged. Depending on the settings in the CPACR_EL1, CPTR_EL2, and CPTR_EL3 registers, and the current Security state and Exception level, an attempt to execute the instruction might be trapped.
Operation
CheckFPAdvSIMDEnabled64(); bits(datasize) operand1; bits(datasize) operand3; bits(datasize) operand4 = V[n, datasize]; operand1 = V[d, datasize]; operand3 = NOT(V[m, datasize]); V[d, datasize] = operand1 EOR ((operand1 EOR operand4) AND operand3);