Intel ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3 Manual page 1337

Hide thumbs Also See for ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3:
Table of Contents

Advertisement

BSF—Bit Scan Forward
Opcode
0F BC
0F BC
Description
Searches the source operand (second operand) for the least significant set bit (1 bit). If
a least significant 1 bit is found, its bit index is stored in the destination operand (first
operand). The source operand can be a register or a memory location; the destination
operand is a register. The bit index is an unsigned offset from bit 0 of the source
operand. If the contents source operand are 0, the contents of the destination operand
is undefined.
Operation
IF SRC = 0
THEN
ZF  1;
DEST is undefined;
ELSE
ZF  0;
temp  0;
WHILE Bit(SRC, temp) = 0
DO
temp  temp + 1;
DEST  temp;
OD;
FI;
Flags Affected
The ZF flag is set to 1 if all the source operand is 0; otherwise, the ZF flag is cleared.
The CF, OF, SF, AF, and PF, flags are undefined.
Additional Itanium System Environment Exceptions
Itanium Reg Faults NaT Register Consumption Abort.
Itanium Mem FaultsVHPT Data Fault, Nested TLB Fault, Data TLB Fault, Alternate Data
Volume 4: Base IA-32 Instruction Reference
Instruction
BSF r16,r/m16
BSF r32,r/m32
TLB Fault, Data Page Not Present Fault, Data NaT Page Consumption
Abort, Data Key Miss Fault, Data Key Permission Fault, Data Access
Rights Fault, Data Access Bit Fault, Data Dirty Bit Fault
Description
Bit scan forward on r/m16
Bit scan forward on r/m32
4:35

Advertisement

Table of Contents
loading

This manual is also suitable for:

Itanium architecture 2.3

Table of Contents