Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Sep 2002 22:13:03 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Peter Wemm <peter@wemm.org>
Cc:        cvs-committers@FreeBSD.org, <cvs-all@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.
Message-ID:  <20020907215414.H19242-100000@gamplex.bde.org>
In-Reply-To: <20020907072825.A50E92A7D6@canning.wemm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020907215414.H19242-100000>