2 * Written by J.T. Conklin <jtc@NetBSD.org>.
4 * Adapted for NetBSD/x86_64 by Frank van der Linden <fvdl@wasabisystems.com>
7 #include <machine/asm.h>
10 RCSID("$NetBSD: ffs.S,v 1.4 2009/07/20 15:21:00 christos Exp $")
15 jz 1f /* ZF is set if all bits are 0 */
16 incl %eax /* bits numbered from 1, not 0 */
19 1: xorl %eax,%eax /* clear result */