OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
CVS: cvs.openbsd.org: src

From: Miod Vallat (miodcvs.openbsd.org)
Date: Thu Apr 01 2004 - 14:39:59 CST


CVSROOT: /cvs
Module name: src
Changes by: miodcvs.openbsd.org 2004/04/01 13:39:59

Modified files:
        lib/libc/arch/m88k/string: Makefile.inc
        sys/lib/libkern/arch/m88k: Makefile.inc
Removed files:
        lib/libc/arch/m88k/string: ffs.S
        sys/lib/libkern/arch/m88k: ffs.S

Log message:
It turns out that the so-called fast ffs(3) routines were wrong, as soon as
more than one bit is set, as the ff1 instruction counts from the highest
order.

However, gcc/m88k with optimization enabled would use a correct, short
sequence based upon ff1 and tweaks, to achieve the intended result, hence
i did not catch this flaw initially.

So revert to the C implementation - it is correct, still decently fast, and
will only be used when compiling at -O0.