Commit 35758e5b by H.J. Lu Committed by H.J. Lu

Add -march=/-mtune=corei7-avx.

2010-12-06  H.J. Lu  <hongjiu.lu@intel.com>

	* config.gcc: Allow corei7-avx for --with-arch/--with-cpu.

	* config/i386/driver-i386.c (host_detect_local_cpu): Support
	Sandy Bridge.

	* config/i386/i386.c (override_options): Handle "corei7-avx".

	* doc/invoke.texi: Document corei7-avx.

From-SVN: r167495
parent e7e9ce46
2010-12-06 H.J. Lu <hongjiu.lu@intel.com>
* config.gcc: Allow corei7-avx for --with-arch/--with-cpu.
* config/i386/driver-i386.c (host_detect_local_cpu): Support
Sandy Bridge.
* config/i386/i386.c (override_options): Handle "corei7-avx".
* doc/invoke.texi: Document corei7-avx.
2010-12-06 Richard Guenther <rguenther@suse.de> 2010-12-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46806 PR tree-optimization/46806
...@@ -1234,7 +1234,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i ...@@ -1234,7 +1234,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i
need_64bit_hwint=yes need_64bit_hwint=yes
need_64bit_isa=yes need_64bit_isa=yes
case X"${with_cpu}" in case X"${with_cpu}" in
Xgeneric|Xatom|Xcore2|Xcorei7|Xnocona|Xx86-64|Xbdver1|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3) Xgeneric|Xatom|Xcore2|Xcorei7|Xcorei7-avx|Xnocona|Xx86-64|Xbdver1|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3)
;; ;;
X) X)
if test x$with_cpu_64 = x; then if test x$with_cpu_64 = x; then
...@@ -1243,7 +1243,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i ...@@ -1243,7 +1243,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i
;; ;;
*) *)
echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
echo "generic atom core2 corei7 nocona x86-64 bdver1 amdfam10 barcelona k8 opteron athlon64 athlon-fx athlon64-sse3 k8-sse3 opteron-sse3" 1>&2 echo "generic atom core2 corei7 corei7-avx nocona x86-64 bdver1 amdfam10 barcelona k8 opteron athlon64 athlon-fx athlon64-sse3 k8-sse3 opteron-sse3" 1>&2
exit 1 exit 1
;; ;;
esac esac
...@@ -1372,7 +1372,7 @@ i[34567]86-*-solaris2*) ...@@ -1372,7 +1372,7 @@ i[34567]86-*-solaris2*)
need_64bit_isa=yes need_64bit_isa=yes
use_gcc_stdint=wrap use_gcc_stdint=wrap
case X"${with_cpu}" in case X"${with_cpu}" in
Xgeneric|Xatom|Xcore2|Xcorei7|Xnocona|Xx86-64|Xbdver1|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3) Xgeneric|Xatom|Xcore2|Xcorei7|Xcorei7-avx|Xnocona|Xx86-64|Xbdver1|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3)
;; ;;
X) X)
if test x$with_cpu_64 = x; then if test x$with_cpu_64 = x; then
...@@ -1381,7 +1381,7 @@ i[34567]86-*-solaris2*) ...@@ -1381,7 +1381,7 @@ i[34567]86-*-solaris2*)
;; ;;
*) *)
echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
echo "generic atom core2 corei7 nocona x86-64 bdver1 amdfam10 barcelona k8 opteron athlon64 athlon-fx athlon64-sse3 k8-sse3 opteron-sse3" 1>&2 echo "generic atom core2 corei7 corei7-avx nocona x86-64 bdver1 amdfam10 barcelona k8 opteron athlon64 athlon-fx athlon64-sse3 k8-sse3 opteron-sse3" 1>&2
exit 1 exit 1
;; ;;
esac esac
...@@ -1452,7 +1452,7 @@ i[34567]86-*-mingw* | x86_64-*-mingw*) ...@@ -1452,7 +1452,7 @@ i[34567]86-*-mingw* | x86_64-*-mingw*)
if test x$enable_targets = xall; then if test x$enable_targets = xall; then
tm_defines="${tm_defines} TARGET_BI_ARCH=1" tm_defines="${tm_defines} TARGET_BI_ARCH=1"
case X"${with_cpu}" in case X"${with_cpu}" in
Xgeneric|Xatom|Xcore2|Xcorei7|Xnocona|Xx86-64|Xbdver1|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3) Xgeneric|Xatom|Xcore2|Xcorei7|Xcorei7-avx|Xnocona|Xx86-64|Xbdver1|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3)
;; ;;
X) X)
if test x$with_cpu_64 = x; then if test x$with_cpu_64 = x; then
...@@ -1461,7 +1461,7 @@ i[34567]86-*-mingw* | x86_64-*-mingw*) ...@@ -1461,7 +1461,7 @@ i[34567]86-*-mingw* | x86_64-*-mingw*)
;; ;;
*) *)
echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
echo "generic atom core2 corei7 nocona x86-64 bdver1 amdfam10 barcelona k8 opteron athlon64 athlon-fx athlon64-sse3 k8-sse3 opteron-sse3" 1>&2 echo "generic atom core2 corei7 Xcorei7-avx nocona x86-64 bdver1 amdfam10 barcelona k8 opteron athlon64 athlon-fx athlon64-sse3 k8-sse3 opteron-sse3" 1>&2
exit 1 exit 1
;; ;;
esac esac
...@@ -2828,6 +2828,10 @@ case ${target} in ...@@ -2828,6 +2828,10 @@ case ${target} in
arch=corei7 arch=corei7
cpu=corei7 cpu=corei7
;; ;;
corei7_avx-*)
arch=corei7-avx
cpu=corei7-avx
;;
pentium_m-*) pentium_m-*)
arch=pentium-m arch=pentium-m
cpu=pentium-m cpu=pentium-m
...@@ -3265,7 +3269,7 @@ case "${target}" in ...@@ -3265,7 +3269,7 @@ case "${target}" in
"" | x86-64 | generic | native \ "" | x86-64 | generic | native \
| k8 | k8-sse3 | athlon64 | athlon64-sse3 | opteron \ | k8 | k8-sse3 | athlon64 | athlon64-sse3 | opteron \
| opteron-sse3 | athlon-fx | bdver1 | amdfam10 \ | opteron-sse3 | athlon-fx | bdver1 | amdfam10 \
| barcelona | nocona | core2 | corei7 | atom) | barcelona | nocona | core2 | corei7 | corei7-avx | atom)
# OK # OK
;; ;;
*) *)
......
...@@ -568,6 +568,10 @@ const char *host_detect_local_cpu (int argc, const char **argv) ...@@ -568,6 +568,10 @@ const char *host_detect_local_cpu (int argc, const char **argv)
/* Westmere. */ /* Westmere. */
cpu = "corei7"; cpu = "corei7";
break; break;
case 0x2a:
/* Sandy Bridge. */
cpu = "corei7-avx";
break;
case 0x17: case 0x17:
case 0x1d: case 0x1d:
/* Penryn. */ /* Penryn. */
......
...@@ -3237,6 +3237,10 @@ ix86_option_override_internal (bool main_args_p) ...@@ -3237,6 +3237,10 @@ ix86_option_override_internal (bool main_args_p)
{"corei7", PROCESSOR_COREI7_64, CPU_COREI7, {"corei7", PROCESSOR_COREI7_64, CPU_COREI7,
PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3 PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3
| PTA_SSSE3 | PTA_SSE4_1 | PTA_SSE4_2 | PTA_CX16}, | PTA_SSSE3 | PTA_SSE4_1 | PTA_SSE4_2 | PTA_CX16},
{"corei7-avx", PROCESSOR_COREI7_64, CPU_COREI7,
PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3
| PTA_SSSE3 | PTA_SSE4_1 | PTA_SSE4_2 | PTA_AVX
| PTA_CX16 | PTA_POPCNT | PTA_AES | PTA_PCLMUL},
{"atom", PROCESSOR_ATOM, CPU_ATOM, {"atom", PROCESSOR_ATOM, CPU_ATOM,
PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3 PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3
| PTA_SSSE3 | PTA_CX16 | PTA_MOVBE}, | PTA_SSSE3 | PTA_CX16 | PTA_MOVBE},
...@@ -12081,6 +12081,9 @@ instruction set support. ...@@ -12081,6 +12081,9 @@ instruction set support.
@item corei7 @item corei7
Intel Core i7 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1 Intel Core i7 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1
and SSE4.2 instruction set support. and SSE4.2 instruction set support.
@item corei7-avx
Intel Core i7 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3, SSSE3,
SSE4.1, SSE4.2, AVX, AES and PCLMUL instruction set support.
@item atom @item atom
Intel Atom CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3 and SSSE3 Intel Atom CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3 and SSSE3
instruction set support. instruction set support.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment