Opcode | Encoding | 16-bit | 32-bit | 64-bit | CPUID Feature Flag(s) | Description |
---|---|---|---|---|---|---|
XOP.L0.NP.09.W0 02 /6 BLCI r32, r/m32 | rm | Invalid | Valid | Valid | tbm | Isolate the lowest clear bit from r/m32 and clear that same bit in r32. Set all other bits in r32. |
XOP.L0.NP.09.W1 02 /6 BLCI r64, r/m64 | rm | Invalid | Invalid | Valid | tbm | Isolate the lowest clear bit from r/m64 and clear that same bit in r64. Set all other bits in r64. |
Encoding
Encoding | Operand 1 | Operand 2 |
---|---|---|
rm | ModRM.reg[rw] | ModRM.r/m[r] |
Description
The BLCI
instruction extracts (isolates) the lowest clear bit in the source operand and clears the same bit in the destination operand. All other bits in the destination operand are set.
The operand size is always 32 bits if not in Long Mode. In other words, XOP.W1
is treated as XOP.W0
outside Long Mode.
Operation
public void BLCI(ref U32 dest, U32 src)
{
dest = src | ~(src + 1);
}
public void BLCI(ref U64 dest, U64 src)
{
dest = src | ~(src + 1);
}
Flags Affected
CF
(carry flag)- Set according to the result.
PF
(parity flag)- Set according to the result.
AF
(auxiliary flag)- Set according to the result.
ZF
(zero flag)- Set according to the result.
SF
(sign flag)- Set according to the result.
OF
(overflow flag)- Set according to the result.
Intrinsics