From 6f82d0e8f9756938f04071892206a5af85e676f0 Mon Sep 17 00:00:00 2001 From: cvs2svn Date: Fri, 13 Jul 2012 17:49:56 +0000 Subject: This commit was manufactured by cvs2git to create tag 'eric_g2k12'. --- src/lib/libc/string/ffs.c | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 src/lib/libc/string/ffs.c (limited to 'src/lib/libc/string/ffs.c') diff --git a/src/lib/libc/string/ffs.c b/src/lib/libc/string/ffs.c deleted file mode 100644 index 7dec1613a8..0000000000 --- a/src/lib/libc/string/ffs.c +++ /dev/null @@ -1,44 +0,0 @@ -/* $OpenBSD: ffs.c,v 1.7 2005/08/08 08:05:37 espie Exp $ */ - -/* - * Public domain. - * Written by Dale Rahn. - */ - -#if !defined(_KERNEL) && !defined(_STANDALONE) -#include -#else -#include -#endif - -/* - * ffs -- vax ffs instruction - */ -int -ffs(int mask) -{ - int bit; - unsigned int r = mask; - static const signed char t[16] = { - -28, 1, 2, 1, - 3, 1, 2, 1, - 4, 1, 2, 1, - 3, 1, 2, 1 - }; - - bit = 0; - if (!(r & 0xffff)) { - bit += 16; - r >>= 16; - } - if (!(r & 0xff)) { - bit += 8; - r >>= 8; - } - if (!(r & 0xf)) { - bit += 4; - r >>= 4; - } - - return (bit + t[ r & 0xf ]); -} -- cgit v1.2.3-55-g6feb