Isolate Lowest Clear Bit and Complement

Encoding

EncodingOperand 1Operand 2
rmModRM.reg[w]ModRM.r/m[r]

Description

The BLCIC instruction extracts (isolates) the lowest set 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 BLCIC(ref U32 dest, U32 src)
{
    dest = ~src & (src + 1);
}

public void BLCIC(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

Exceptions

SIMD Floating-Point

None.

Other Exceptions