From eb8dd9dca1228af0cd132f515509051ecfabf6f6 Mon Sep 17 00:00:00 2001 From: cvs2svn Date: Mon, 14 Apr 2025 17:32:06 +0000 Subject: This commit was manufactured by cvs2git to create tag 'tb_20250414'. --- src/lib/libc/string/ffs.c | 40 ---------------------------------------- 1 file changed, 40 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 09d6e35eca..0000000000 --- a/src/lib/libc/string/ffs.c +++ /dev/null @@ -1,40 +0,0 @@ -/* $OpenBSD: ffs.c,v 1.10 2018/01/18 08:23:44 guenther Exp $ */ - -/* - * Public domain. - * Written by Dale Rahn. - */ - -#include - -/* - * 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