Commit | Line | Data |
---|---|---|
f15e832d KB |
1 | /* |
2 | * Copyright (c) 1988 Regents of the University of California. | |
3 | * All rights reserved. | |
4 | * | |
019bea33 | 5 | * %sccs.include.redist.c% |
4afb9d15 | 6 | * |
f15e832d KB |
7 | * This code is derived from software contributed to Berkeley by |
8 | * Computer Consoles Inc. | |
f15e832d KB |
9 | */ |
10 | ||
11 | #if defined(LIBC_SCCS) && !defined(lint) | |
019bea33 | 12 | .asciz "@(#)ffs.s 1.4 (Berkeley) %G%" |
f15e832d | 13 | #endif /* LIBC_SCCS and not lint */ |
05c40364 SL |
14 | |
15 | /* bit = ffs(value) */ | |
16 | ||
17 | #include "DEFS.h" | |
18 | ||
19 | ENTRY(ffs, 0) | |
20 | ffs 4(fp),r0 | |
21 | bgeq 1f | |
22 | mnegl $1,r0 | |
23 | 1: | |
24 | incl r0 | |
25 | ret |