Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Feb 2005 11:25:24 -0800
From:      Steve Kargl <sgk@troutmask.apl.washington.edu>
To:        Thomas Krause -CI- <freebsd-amd64@chef-ingenieur.de>
Cc:        freebsd-amd64@freebsd.org
Subject:   Re: -mno-sse -mno-sse2 -mno-mmx -mno-3dnow when compiling kernel
Message-ID:  <20050213192524.GA41820@troutmask.apl.washington.edu>
In-Reply-To: <420FA306.8010102@chef-ingenieur.de>
References:  <420F9CA1.4040207@chef-ingenieur.de> <20050213184051.GA41566@troutmask.apl.washington.edu> <420FA306.8010102@chef-ingenieur.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Feb 13, 2005 at 07:57:10PM +0100, Thomas Krause -CI- wrote:
> Steve Kargl schrieb:
> >On Sun, Feb 13, 2005 at 07:29:53PM +0100, Thomas Krause -CI- wrote:
> >
> >>Hello,
> >>why are the Switches "-mno-sse -mno-sse2 -mno-mmx -mno-3dnow" are set
> >>when compiling an amd64 kernel? I think, the CPU supports all thease
> >>features.
> >>
> >
> >
> >AFAIK, floating point is not permitted in the kernel.  Why would
> >you need to use sse, sse2, mmx, or 3dnow?
> >
> I don't know, if thease features are useful in the kernel. But when
> compiling a x86 kernel, they are not disabled.

I suggest you read the gcc.info file, in particular see the
description of -mfpmathi option.  It seems that if you are
building i386 (or equivalent 32bit processor), then these options
are automatically disabled by the compiler.  If you are building
for amd64 (or Intel's copycat), then these options are automatically
enabled by the compiler.  These options are used to compile 
floating point code.  There is no floating point code in the kernel,
so the options are useless and should be turned off.

> As I remember, you can compile libpng using mmx features. (I'm unsure,
> if you need a mmx-optimized kernel for that.)

libpng uses floating point code, so it can take advantage of 
mmx.  The kernel's feature list for my CPU,
   Features=0x183f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,
   MCA,CMOV,PAT,PSE36,MMX,FXSR>
shows that the CPU supports MMX, and thus libpng compile with
mmx will work just fine. 

-- 
Steve



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