From owner-cvs-all Sat Sep 7 5: 5:46 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2916837B400; Sat, 7 Sep 2002 05:05:40 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id B8BE243E3B; Sat, 7 Sep 2002 05:05:38 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id WAA06721; Sat, 7 Sep 2002 22:05:29 +1000 Date: Sat, 7 Sep 2002 22:13:03 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Peter Wemm Cc: cvs-committers@FreeBSD.org, Subject: Re: cvs commit: src/sys/conf options.i386 options.pc98 src/sys/i386/conf NOTES src/sys/i386/i386 initcpu.c machdep.c src/sys/i386/isa npx.c src/sys/i386/linux linux_ptrace.c src/sys/pc98/i386 machdep. In-Reply-To: <20020907072825.A50E92A7D6@canning.wemm.org> Message-ID: <20020907215414.H19242-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, 7 Sep 2002, Peter Wemm wrote: > Peter Wemm wrote: > > peter 2002/09/07 00:02:12 PDT > > > > Modified files: > > sys/conf options.i386 options.pc98 > > sys/i386/conf NOTES > > sys/i386/i386 initcpu.c machdep.c > > sys/i386/isa npx.c > > sys/i386/linux linux_ptrace.c > > sys/pc98/i386 machdep.c > > Log: > > Automatically enable CPU_ENABLE_SSE (detect and enable SSE instructions) > > if compiling with I686_CPU as a target. CPU_DISABLE_SSE will prevent > > this from happening and will guarantee the code is not compiled in. > > > > I am still not happy with this, but gcc is now generating code that uses > > these instructions if you set CPUTYPE to p3/p4 or athlon-4/mp/xp or higher. > > I've been trying to figure out the right syntax for negative options. CPU_DISABLE_SSE is enough in this case, since CPU_ENABLE_SSE shouldn't exist (or have existed for so long). There are runtime tests for the feature, and it has small runtime space/time overheads. Perhaps it should be disabled unconditionally on CPUs that can't have it (386, 486, 586(?)). Similarly for the npx option, except disabling it is even less useful. > I'd have rathered have a common definitions file that had a list of default > options and then disable them in per-system configurations. eg: instead > of > options CPU_DISABLE_SSE > have something like this instead: > disable CPU_ENABLE_SSE > options -CPU_ENABLE_SSE > noopt CPU_DISABLE_SSE > -option CPU_DISABLE_SSE > or something. I just cannot quite think of something I like. > enable/disable might make sense if we had an 'enable' keyword. > eg: "enable ACPI_DEBUG" instead of "options ACPI_DEBUG" etc. The ifdefs for this might still be messy. Currently you have ones which enable SSE if certain CPUs are configured and then disable it if CPU_DISABLE_SSE is configured. Putting this tangle in config files wouldn't be much simpler. Logically it is simplest for all options to be positive at at least 1 level. I think I prefer positive options at the source code level. config(8) could turn negative options into the absence of positive options and negative options into positive ones. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message