From 242436d2e222f3bba161b5a5e44c73efcd43ce44 Mon Sep 17 00:00:00 2001 From: kettenis Date: Tue, 30 Jan 2018 21:08:05 +0000 Subject: [PATCH] No need to add ffs.c as we use .VPATH to reach over into libc/string. ok otto@ --- libexec/ld.so/ffs.c | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 libexec/ld.so/ffs.c diff --git a/libexec/ld.so/ffs.c b/libexec/ld.so/ffs.c deleted file mode 100644 index 8c5e6240f5d..00000000000 --- a/libexec/ld.so/ffs.c +++ /dev/null @@ -1,40 +0,0 @@ -/* $OpenBSD: ffs.c,v 1.1 2018/01/30 20:15:25 otto 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 ]); -} -- 2.20.1