ffs.S (137463) | ffs.S (139815) |
---|---|
1/* $NetBSD: ffs.S,v 1.3 2003/04/05 23:27:15 bjh21 Exp $ */ | 1/* $NetBSD: ffs.S,v 1.3 2003/04/05 23:27:15 bjh21 Exp $ */ |
2/* | 2/*- |
3 * Copyright (c) 2001 Christopher Gilbert 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. --- 13 unchanged lines hidden (view full) --- 24 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 */ 30 31#include <machine/asm.h> | 3 * Copyright (c) 2001 Christopher Gilbert 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. --- 13 unchanged lines hidden (view full) --- 24 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 */ 30 31#include <machine/asm.h> |
32__FBSDID("$FreeBSD: head/sys/libkern/arm/ffs.S 137463 2004-11-09 16:47:47Z cognet $"); | 32__FBSDID("$FreeBSD: head/sys/libkern/arm/ffs.S 139815 2005-01-07 00:24:33Z imp $"); |
33 34 35/* 36 * ffs - find first set bit, this algorithm isolates the first set 37 * bit, then multiplies the number by 0x0450fbaf which leaves the top 38 * 6 bits as an index into the table. This algorithm should be a win 39 * over the checking each bit in turn as per the C compiled version. 40 * --- 44 unchanged lines hidden --- | 33 34 35/* 36 * ffs - find first set bit, this algorithm isolates the first set 37 * bit, then multiplies the number by 0x0450fbaf which leaves the top 38 * 6 bits as an index into the table. This algorithm should be a win 39 * over the checking each bit in turn as per the C compiled version. 40 * --- 44 unchanged lines hidden --- |