Compiler Flags problem with core2 CPU

James Phillips anti_spam256 at
Mon Mar 1 21:24:58 UTC 2010

> Date: Sun, 28 Feb 2010 22:37:27 +0800
> From: Aaron Lewis <aaron.lewis1989 at>
> Subject: Re: Compiler Flags problem with core2 CPU
> To: Paul B Mahol <onemda at>
> Cc: freebsd-questions at
> Message-ID: <4B8A7FA7.1070200 at>
> Content-Type: text/plain; charset=ISO-8859-1;
> format=flowed
> Really ? It's bad to use custom flags to compile kernel ,
> why do you 
> think so ?
> I'd like to know more about this : )
> So setting optimize compiler flags is only useful for
> userland stuff ?
I laughed at your question because I remember reading somewhere that using aggressive optimization options is a good way to find compiler bugs. I think that extends of optimizations for "new" CPU architectures as well. 
I also heard kernel code avoids MMX instructions for some reason: it may have to do with interrupt handling (fewer registers=faster?). x86 (and AMD64) processors are backwards compatible, so you don't strictly need the latest instructions.


James Phillips

The new Internet Explorer® 8 - Faster, safer, easier.  Optimized for Yahoo!  Get it Now for Free! at

More information about the freebsd-questions mailing list