diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2010-02-26 22:35:34 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2010-02-26 14:35:34 -0800 |
commit | 4d16c0dc918215ef04402f808d0504b0b52d306d (patch) | |
tree | 6a342c05f368403ddfcd707696d2257fb3bcd0ec | |
parent | 0e94b75085af60341759c30fb522c9438c4b18b8 (diff) | |
download | gcc-4d16c0dc918215ef04402f808d0504b0b52d306d.zip gcc-4d16c0dc918215ef04402f808d0504b0b52d306d.tar.gz gcc-4d16c0dc918215ef04402f808d0504b0b52d306d.tar.bz2 |
Set the default arch at least to Prescott/Pentium 4.
2010-02-26 H.J. Lu <hongjiu.lu@intel.com>
* config.gcc: Set the default arch at least to Prescott for
i[34567]86-*-darwin* and Pentium 4 for i[34567]86-*-* targets
if SSE math is enabled.
From-SVN: r157101
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config.gcc | 31 |
2 files changed, 31 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f731855..0825bc4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-02-26 H.J. Lu <hongjiu.lu@intel.com> + + * config.gcc: Set the default arch at least to Prescott for + i[34567]86-*-darwin* and Pentium 4 for i[34567]86-*-* targets + if SSE math is enabled. + 2010-02-26 Manuel López-Ibáñez <manu@gcc.gnu.org> * diagnostic.c (diagnostic_initialize): Update. diff --git a/gcc/config.gcc b/gcc/config.gcc index df84f50..a189400 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -2625,16 +2625,20 @@ esac # to generic if there is no processor scheduler model for the target. arch= cpu= +arch_without_sse2=no case ${target} in i386-*-*) arch=i386 cpu=i386 + arch_without_sse2=yes ;; i486-*-*) arch=i486 cpu=i486 + arch_without_sse2=yes ;; i586-*-*) + arch_without_sse2=yes case ${target_noncanonical} in k6_2-*) arch=k6-2 @@ -2675,22 +2679,27 @@ case ${target} in athlon_xp-*|athlon_mp-*|athlon_4-*) arch=athlon-4 cpu=athlon-4 + arch_without_sse2=yes ;; athlon_tbird-*|athlon-*) arch=athlon cpu=athlon + arch_without_sse2=yes ;; geode-*) arch=geode cpu=geode + arch_without_sse2=yes ;; pentium2-*) arch=pentium2 cpu=pentium2 + arch_without_sse2=yes ;; pentium3-*|pentium3m-*) arch=pentium3 cpu=pentium3 + arch_without_sse2=yes ;; pentium4-*|pentium4m-*) arch=pentium4 @@ -2719,10 +2728,12 @@ case ${target} in pentiumpro-*) arch=pentiumpro cpu=pentiumpro + arch_without_sse2=yes ;; *) arch=pentiumpro cpu=generic + arch_without_sse2=yes ;; esac ;; @@ -2836,14 +2847,22 @@ esac if test x$with_arch = x ; then case ${target} in i[34567]86-*-darwin*) - # Don't set default arch for Darwin since it will set the default - # ISA to SSE2. + # SSE math is enabled for Darwin, which sets the default ISA to + # SSE2. The minimum ISA supported Darwin is SSE3, which is the + # same as Prescott. + if test $arch_without_sse2 = no; then + with_arch=$arch + else + with_arch=prescott + fi ;; i[34567]86-*-*) - # Don't set default arch if --with-fpmath is used since it will set - # the default ISA to SSE2. - if test x$with_fpmath = x; then - with_arch=$arch + # --with-fpmath sets the default ISA to SSE2, which is the same + # ISA supported by Pentium 4. + if test x$with_fpmath = x || test $arch_without_sse2 = no; then + with_arch=$arch + else + with_arch=pentium4 fi ;; x86_64-*-*) |