This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Generate i486 code by default on FreeBSD/ia32


On Sun, 6 Feb 2011, Tijl Coosemans wrote:
> When targeting FreeBSD/ia32 6.0 and newer, cc1 uses -march=i486
> -mtune=generic by default, i.e. when not passed -march/-mtune on the
> command line. These are correct defaults.
> 
> The gcc driver however always passes -march/-mtune to cc1 so that
> default behaviour never kicks in. The driver's default values of
> -march/-mtune are determined by ./configure (gcc/config.gcc).

We really should address this with GCC 4.6.  Right now, GCC on
FreeBSD x86 underperforms quite a bit due to this.

I'll be happy to commit this; who 's gonna bite and approve? ;-)


(Is this sufficiently aggressive, actually?  Could we not make this
i686 even, and include SSE2?  Perhaps on some newer versions of the
OS at least, Tijl?)

Gerald

>         * config.gcc (FreeBSD/i386): Default arch is i486.
> 
> --- gcc/config.gcc.orig	2011-01-26 05:19:58.000000000 +0100
> +++ gcc/config.gcc	2011-02-01 16:58:17.000000000 +0100
> @@ -2766,6 +2766,16 @@
>  arch_without_sse2=no
>  arch_without_64bit=no
>  case ${target} in
> +  i386-*-freebsd*)
> +    if test $fbsd_major -ge 6; then
> +      arch=i486
> +    else
> +      arch=i386
> +    fi
> +    cpu=generic
> +    arch_without_sse2=yes
> +    arch_without_64bit=yes
> +    ;;
>    i386-*-*)
>      arch=i386
>      cpu=i386
> 

-- 
Gerald (Jerry) Pfeifer   gerald@pfeifer.com   http://www.pfeifer.com/gerald/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]