134438Sbostic/* 234438Sbostic * Copyright (c) 1988 Regents of the University of California. 334438Sbostic * All rights reserved. 434438Sbostic * 5*34824Sbostic * Redistribution and use in source and binary forms are permitted 6*34824Sbostic * provided that the above copyright notice and this paragraph are 7*34824Sbostic * duplicated in all such forms and that any documentation, 8*34824Sbostic * advertising materials, and other materials related to such 9*34824Sbostic * distribution and use acknowledge that the software was developed 10*34824Sbostic * by the University of California, Berkeley. The name of the 11*34824Sbostic * University may not be used to endorse or promote products derived 12*34824Sbostic * from this software without specific prior written permission. 13*34824Sbostic * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14*34824Sbostic * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15*34824Sbostic * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16*34824Sbostic * 1734438Sbostic * This code is derived from software contributed to Berkeley by 1834438Sbostic * Computer Consoles Inc. 1934438Sbostic */ 2029694Ssam 2134438Sbostic#if defined(LIBC_SCCS) && !defined(lint) 22*34824Sbostic .asciz "@(#)ffs.s 1.3 (Berkeley) 06/27/88" 2334438Sbostic#endif /* LIBC_SCCS and not lint */ 2434438Sbostic 2529694Ssam/* bit = ffs(value) */ 2629694Ssam 2729694Ssam#include "DEFS.h" 2829694Ssam 2929694SsamENTRY(ffs, 0) 3029694Ssam ffs 4(fp),r0 3129694Ssam bgeq 1f 3229694Ssam mnegl $1,r0 3329694Ssam1: 3429694Ssam incl r0 3529694Ssam ret 36