macro and text revision (-mdoc version 3)
[unix-history] / usr / src / lib / libc / vax / string / ffs.s
CommitLineData
586c39b1
DF
1/*
2 * Copyright (c) 1983 Regents of the University of California.
493b70ca
KB
3 * All rights reserved.
4 *
019bea33 5 * %sccs.include.redist.c%
586c39b1
DF
6 */
7
f4f66d2c 8#if defined(LIBC_SCCS) && !defined(lint)
019bea33 9 .asciz "@(#)ffs.s 5.6 (Berkeley) %G%"
f4f66d2c 10#endif /* LIBC_SCCS and not lint */
586c39b1 11
69a7b8f8
SL
12/* bit = ffs(value) */
13
14#include "DEFS.h"
15
dadab5a2 16ENTRY(ffs, 0)
69a7b8f8
SL
17 ffs $0,$32,4(ap),r0
18 bneq 1f
19 mnegl $1,r0
201:
21 incl r0
22 ret