From owner-cvs-all Thu Aug 19 7:55:37 1999 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id A053C15002; Thu, 19 Aug 1999 07:55:34 -0700 (PDT) (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id HAA43931; Thu, 19 Aug 1999 07:54:41 -0700 (PDT) (envelope-from peter@FreeBSD.org) Message-Id: <199908191454.HAA43931@freefall.freebsd.org> From: Peter Wemm Date: Thu, 19 Aug 1999 07:54:41 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/i386/include cpufunc.h Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk peter 1999/08/19 07:54:40 PDT Modified files: sys/i386/include cpufunc.h Log: Undo my previous commit and do it differently. Break the ffs() etc macros into two parts - one to do the bsfl and the other to convert the result (base 0) to ffs()-like (base 1) in inline C. This enables the optimizer to be a lot smarter in certain cases, like where it knows that the argument is non-zero and we want ffs(known non zero arg) - 1. This appears to produce identical code to the old inline when the argument is unknown. Revision Changes Path 1.90 +27 -14 src/sys/i386/include/cpufunc.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message