image/svg+xmlBZHI — Zero High Bits Starting with Specified Bit PositionInstruction Operand EncodingDescriptionBZHI copies the bits of the first source operand (the second operand) into the destination operand (the first operand) and clears the higher bits in the destination according to the INDEX value specified by the second source operand (the third operand). The INDEX is specified by bits 7:0 of the second source operand. The INDEX value is saturated at the value of OperandSize -1. CF is set, if the number contained in the 8 low bits of the third operand is greater than OperandSize -1.This instruction is not supported in real mode and virtual-8086 mode. The operand size is always 32 bits if not in 64-bit mode. In 64-bit mode operand size 64 requires VEX.W1. VEX.W1 is ignored in non-64-bit modes. An attempt to execute this instruction with VEX.L not equal to 0 will cause #UD.OperationN := SRC2[7:0]DEST := SRC1IF (N < OperandSize)DEST[OperandSize-1:N] := 0FIIF (N > OperandSize - 1)CF := 1ELSECF := 0FIFlags AffectedZF, CF and SF flags are updated based on the result. OF flag is cleared. AF and PF flags are undefined.Intel C/C++ Compiler Intrinsic EquivalentBZHI:unsigned __int32 _bzhi_u32(unsigned __int32 src, unsigned __int32 index);BZHI:unsigned __int64 _bzhi_u64(unsigned __int64 src, unsigned __int32 index);SIMD Floating-Point ExceptionsNoneOther ExceptionsSee Table2-29, “Type 13 Class Exception Conditions”.Opcode/InstructionOp/ En64/32-bit ModeCPUID Feature FlagDescriptionVEX.LZ.0F38.W0 F5 /rBZHI r32a, r/m32, r32bRMVV/VBMI2Zero bits in r/m32 starting with the position in r32b, write result to r32a.VEX.LZ.0F38.W1 F5 /rBZHI r64a, r/m64, r64bRMVV/N.E.BMI2Zero bits in r/m64 starting with the position in r64b, write result to r64a.Op/EnOperand 1Operand 2Operand 3Operand 4RMVModRM:reg (w)ModRM:r/m (r)VEX.vvvv (r)NA

This UNOFFICIAL reference was generated from the official Intel® 64 and IA-32 Architectures Software Developer’s Manual by a dumb script. There is no guarantee that some parts aren't mangled or broken and is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.