From 9d913bbf3fc996874649168d7d144a642012ac9b Mon Sep 17 00:00:00 2001 From: Kelley Cook Date: Sun, 23 Feb 2003 03:10:03 +0000 Subject: [PATCH] i386.c: Replace "mcpu" with "mtune". * config/i386/i386.c: Replace "mcpu" with "mtune". * config/i386/i386.h (TARGET_OPTIONS): Likewise. (CC1_CPU_SPEC): Likewise. New warning for "-mcpu". * doc/invoke.texi (i386 and x86-64 Options): Replace "mcpu" with "mtune". Note that "mcpu" is a deprecated synonym for "mtune". * g++.old-deja/g++.other/store-expr1.C: Replace "mcpu" with "mtune". * g++.old-deja/g++.other/store-expr2.C: Likewise. * gcc.c-torture/execute/20010129-1.x: Likewise. * gcc.dg/20011107-1.c: Likewise. * gcc.dg/20020108-1.c: Likewise. * gcc.dg/20020122-3.c: Likewise. * gcc.dg/20020206-1.c: Likewise. * gcc.dg/20020310-1.c: Likewise. * gcc.dg/20020426-2.c: Likewise. * gcc.dg/20020517-1.c: Likewise. * gcc.dg/991230-1.c: Likewise. * gcc.dg/i386-unroll-1.c: Likewise. * gcc.misc-tests/i386-prefetch.exp: Likewise. From-SVN: r63313 --- gcc/ChangeLog | 8 ++++++ gcc/config/i386/i386.c | 4 +-- gcc/config/i386/i386.h | 25 ++++++++++-------- gcc/doc/invoke.texi | 18 ++++++++----- gcc/testsuite/ChangeLog | 17 ++++++++++++ .../g++.old-deja/g++.other/store-expr1.C | 2 +- .../g++.old-deja/g++.other/store-expr2.C | 2 +- .../gcc.c-torture/execute/20010129-1.x | 2 +- gcc/testsuite/gcc.dg/20011107-1.c | 2 +- gcc/testsuite/gcc.dg/20020108-1.c | 2 +- gcc/testsuite/gcc.dg/20020122-3.c | 2 +- gcc/testsuite/gcc.dg/20020206-1.c | 2 +- gcc/testsuite/gcc.dg/20020310-1.c | 2 +- gcc/testsuite/gcc.dg/20020426-2.c | 2 +- gcc/testsuite/gcc.dg/20020517-1.c | 2 +- gcc/testsuite/gcc.dg/991230-1.c | 2 +- gcc/testsuite/gcc.dg/i386-unroll-1.c | 2 +- .../gcc.misc-tests/i386-prefetch.exp | 26 +++++++++---------- 18 files changed, 77 insertions(+), 45 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1722c578d48..7aaffc82a43 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2003-02-22 Kelley Cook + + * config/i386/i386.c: Replace "mcpu" with "mtune". + * config/i386/i386.h (TARGET_OPTIONS): Likewise. + (CC1_CPU_SPEC): Likewise. New warning for "-mcpu". + * doc/invoke.texi (i386 and x86-64 Options): Replace "mcpu" + with "mtune". Note that "mcpu" is a deprecated synonym for "mtune". + 2003-02-23 Andreas Schwab * config.gcc: Delete references to m68k/t-linux and diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index e18b1fb0b57..a7f6f6f3dfa 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -759,7 +759,7 @@ enum processor_type ix86_cpu; enum processor_type ix86_arch; /* Strings to hold which cpu and instruction set architecture to use. */ -const char *ix86_cpu_string; /* for -mcpu= */ +const char *ix86_cpu_string; /* for -mtune= */ const char *ix86_arch_string; /* for -march= */ const char *ix86_fpmath_string; /* for -mfpmath= */ @@ -1238,7 +1238,7 @@ override_options () if (processor_alias_table[i].flags & PTA_PREFETCH_SSE) x86_prefetch_sse = true; if (i == pta_size) - error ("bad value (%s) for -mcpu= switch", ix86_cpu_string); + error ("bad value (%s) for -mtune= switch", ix86_cpu_string); if (optimize_size) ix86_cost = &size_cost; diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 828cf42f105..5f678cc1c0e 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -432,7 +432,7 @@ extern int x86_prefetch_sse; option if the fixed part matches. The actual option name is made by appending `-m' to the specified name. */ #define TARGET_OPTIONS \ -{ { "cpu=", &ix86_cpu_string, \ +{ { "tune=", &ix86_cpu_string, \ N_("Schedule code for given CPU")}, \ { "fpmath=", &ix86_fpmath_string, \ N_("Generate floating point mathematics using given instruction set")},\ @@ -487,15 +487,18 @@ extern int x86_prefetch_sse; #ifndef CC1_CPU_SPEC #define CC1_CPU_SPEC "\ -%{!mcpu*: \ -%{m386:-mcpu=i386 \ -%n`-m386' is deprecated. Use `-march=i386' or `-mcpu=i386' instead.\n} \ -%{m486:-mcpu=i486 \ -%n`-m486' is deprecated. Use `-march=i486' or `-mcpu=i486' instead.\n} \ -%{mpentium:-mcpu=pentium \ -%n`-mpentium' is deprecated. Use `-march=pentium' or `-mcpu=pentium' instead.\n} \ -%{mpentiumpro:-mcpu=pentiumpro \ -%n`-mpentiumpro' is deprecated. Use `-march=pentiumpro' or `-mcpu=pentiumpro' instead.\n}} \ +%{!mtune*: \ +%{m386:mtune=i386 \ +%n`-m386' is deprecated. Use `-march=i386' or `-mtune=i386' instead.\n} \ +%{m486:-mtune=i486 \ +%n`-m486' is deprecated. Use `-march=i486' or `-mtune=i486' instead.\n} \ +%{mpentium:-mtune=pentium \ +%n`-mpentium' is deprecated. Use `-march=pentium' or `-mtune=pentium' instead.\n} \ +%{mpentiumpro:-mtune=pentiumpro \ +%n`-mpentiumpro' is deprecated. Use `-march=pentiumpro' or `-mtune=pentiumpro' instead.\n} \ +%{mcpu=*:-mtune=%* \ +%n`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.\n}} \ +% + + * g++.old-deja/g++.other/store-expr1.C: Replace "mcpu" + with "mtune". + * g++.old-deja/g++.other/store-expr2.C: Likewise. + * gcc.c-torture/execute/20010129-1.x: Likewise. + * gcc.dg/20011107-1.c: Likewise. + * gcc.dg/20020108-1.c: Likewise. + * gcc.dg/20020122-3.c: Likewise. + * gcc.dg/20020206-1.c: Likewise. + * gcc.dg/20020310-1.c: Likewise. + * gcc.dg/20020426-2.c: Likewise. + * gcc.dg/20020517-1.c: Likewise. + * gcc.dg/991230-1.c: Likewise. + * gcc.dg/i386-unroll-1.c: Likewise. + * gcc.misc-tests/i386-prefetch.exp: Likewise. + Sat Feb 22 20:14:12 CET 2003 Jan Hubicka * gcc.dg/i386-mul.c: New test. diff --git a/gcc/testsuite/g++.old-deja/g++.other/store-expr1.C b/gcc/testsuite/g++.old-deja/g++.other/store-expr1.C index ea7c3527835..100de035507 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/store-expr1.C +++ b/gcc/testsuite/g++.old-deja/g++.other/store-expr1.C @@ -1,5 +1,5 @@ // Skip if not target: i?86-*-* -// Special g++ Options: -mcpu=i686 -O2 -fpic +// Special g++ Options: -mtune=i686 -O2 -fpic class G {}; struct N { diff --git a/gcc/testsuite/g++.old-deja/g++.other/store-expr2.C b/gcc/testsuite/g++.old-deja/g++.other/store-expr2.C index 8724e19fdb5..011f40c3dbb 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/store-expr2.C +++ b/gcc/testsuite/g++.old-deja/g++.other/store-expr2.C @@ -1,5 +1,5 @@ // Skip if not target: i?86-*-* -// Special g++ Options: -mcpu=i686 -O2 +// Special g++ Options: -mtune=i686 -O2 class G {}; struct N { diff --git a/gcc/testsuite/gcc.c-torture/execute/20010129-1.x b/gcc/testsuite/gcc.c-torture/execute/20010129-1.x index 1d34c19959f..d35a7a62c53 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20010129-1.x +++ b/gcc/testsuite/gcc.c-torture/execute/20010129-1.x @@ -1,4 +1,4 @@ if { [istarget "i?86-*-*"] } { - set additional_flags "-mcpu=i686" + set additional_flags "-mtune=i686" } return 0 diff --git a/gcc/testsuite/gcc.dg/20011107-1.c b/gcc/testsuite/gcc.dg/20011107-1.c index 0e969fd34a4..395de3dae34 100644 --- a/gcc/testsuite/gcc.dg/20011107-1.c +++ b/gcc/testsuite/gcc.dg/20011107-1.c @@ -1,5 +1,5 @@ /* { dg-do compile { target i?86-*-* } } */ -/* { dg-options "-O2 -mcpu=k6" } */ +/* { dg-options "-O2 -mtune=k6" } */ void foo (unsigned char *x, const unsigned char *y) diff --git a/gcc/testsuite/gcc.dg/20020108-1.c b/gcc/testsuite/gcc.dg/20020108-1.c index b91022dc583..08baa076ec1 100644 --- a/gcc/testsuite/gcc.dg/20020108-1.c +++ b/gcc/testsuite/gcc.dg/20020108-1.c @@ -5,7 +5,7 @@ is not valid general_operand in HImode. */ /* { dg-do compile } */ /* { dg-options "-O2" } */ -/* { dg-options "-O2 -mcpu=i686" { target i?86-*-* } } */ +/* { dg-options "-O2 -mtune=i686" { target i?86-*-* } } */ void foo (unsigned short *cp) diff --git a/gcc/testsuite/gcc.dg/20020122-3.c b/gcc/testsuite/gcc.dg/20020122-3.c index 42a46050ff7..3b2a371282e 100644 --- a/gcc/testsuite/gcc.dg/20020122-3.c +++ b/gcc/testsuite/gcc.dg/20020122-3.c @@ -4,7 +4,7 @@ /* { dg-do compile } */ /* { dg-options "-Os -fprefetch-loop-arrays -w" } */ -/* { dg-options "-Os -fprefetch-loop-arrays -mcpu=pentium3 -w" { target i?86-*-* } } */ +/* { dg-options "-Os -fprefetch-loop-arrays -mtune=pentium3 -w" { target i?86-*-* } } */ int foo (int *p, int n) { diff --git a/gcc/testsuite/gcc.dg/20020206-1.c b/gcc/testsuite/gcc.dg/20020206-1.c index c5367610610..724c03ab24b 100644 --- a/gcc/testsuite/gcc.dg/20020206-1.c +++ b/gcc/testsuite/gcc.dg/20020206-1.c @@ -4,7 +4,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -fprefetch-loop-arrays -w" } */ -/* { dg-options "-O2 -fprefetch-loop-arrays -mcpu=pentium3 -w" { target i?86-*-* } } */ +/* { dg-options "-O2 -fprefetch-loop-arrays -mtune=pentium3 -w" { target i?86-*-* } } */ struct reload { diff --git a/gcc/testsuite/gcc.dg/20020310-1.c b/gcc/testsuite/gcc.dg/20020310-1.c index ec722ecc4aa..39fbdb0c96b 100644 --- a/gcc/testsuite/gcc.dg/20020310-1.c +++ b/gcc/testsuite/gcc.dg/20020310-1.c @@ -2,7 +2,7 @@ This testcase was miscompiled because of an rtx sharing bug. */ /* { dg-do run } */ /* { dg-options "-O2" } */ -/* { dg-options "-O2 -mcpu=i586" { target i?86-*-* } } */ +/* { dg-options "-O2 -mtune=i586" { target i?86-*-* } } */ struct A { diff --git a/gcc/testsuite/gcc.dg/20020426-2.c b/gcc/testsuite/gcc.dg/20020426-2.c index a0f7f69fcbd..18a172767a1 100644 --- a/gcc/testsuite/gcc.dg/20020426-2.c +++ b/gcc/testsuite/gcc.dg/20020426-2.c @@ -2,7 +2,7 @@ Distilled from zlib sources. */ /* { dg-do run } */ /* { dg-options "-O2" } */ -/* { dg-options "-O2 -frename-registers -fomit-frame-pointer -fPIC -mcpu=i686" { target i?86-*-* } } */ +/* { dg-options "-O2 -frename-registers -fomit-frame-pointer -fPIC -mtune=i686" { target i?86-*-* } } */ typedef struct { diff --git a/gcc/testsuite/gcc.dg/20020517-1.c b/gcc/testsuite/gcc.dg/20020517-1.c index 04386d821ec..40de8663d80 100644 --- a/gcc/testsuite/gcc.dg/20020517-1.c +++ b/gcc/testsuite/gcc.dg/20020517-1.c @@ -2,7 +2,7 @@ was not sign-extended for QImode. */ /* { dg-do run } */ /* { dg-options "-O2" } */ -/* { dg-options "-O2 -mcpu=i686" { target i?86-*-* } } */ +/* { dg-options "-O2 -mtune=i686" { target i?86-*-* } } */ #include diff --git a/gcc/testsuite/gcc.dg/991230-1.c b/gcc/testsuite/gcc.dg/991230-1.c index 39b259541de..76b1b8e9884 100644 --- a/gcc/testsuite/gcc.dg/991230-1.c +++ b/gcc/testsuite/gcc.dg/991230-1.c @@ -1,5 +1,5 @@ /* { dg-do run { target i?86-*-* } } */ -/* { dg-options "-O -ffast-math -mcpu=i486" } */ +/* { dg-options "-O -ffast-math -mtune=i486" } */ /* Test that floating point greater-than tests are compiled correctly with -ffast-math. */ diff --git a/gcc/testsuite/gcc.dg/i386-unroll-1.c b/gcc/testsuite/gcc.dg/i386-unroll-1.c index 9aa227512f1..a424b95eba2 100644 --- a/gcc/testsuite/gcc.dg/i386-unroll-1.c +++ b/gcc/testsuite/gcc.dg/i386-unroll-1.c @@ -1,6 +1,6 @@ /* PR optimization/8599 */ /* { dg-do run { target i?86-*-* } } */ -/* { dg-options "-mcpu=k6 -O2 -funroll-loops" } */ +/* { dg-options "-mtune=k6 -O2 -funroll-loops" } */ extern void exit (int); diff --git a/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp b/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp index 3091845f27f..f452038929e 100644 --- a/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp +++ b/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp @@ -24,14 +24,14 @@ # Do not generate prefetch instructions for the following options. set PREFETCH_NONE [list \ - { -mcpu=i386 } \ - { -mcpu=i486 } \ - { -mcpu=i586 } \ - { -mcpu=i686 } \ - { -mcpu=pentium2 } \ - { -mcpu=k6 } \ - { -mcpu=k6-2 } \ - { -mcpu=k6-3 } \ + { -mtune=i386 } \ + { -mtune=i486 } \ + { -mtune=i586 } \ + { -mtune=i686 } \ + { -mtune=pentium2 } \ + { -mtune=k6 } \ + { -mtune=k6-2 } \ + { -mtune=k6-3 } \ { -march=i386 } \ { -march=i486 } \ { -march=i586 } \ @@ -40,14 +40,14 @@ set PREFETCH_NONE [list \ { -march=k6 } ] # For options in PREFETCH_SSE, generate SSE prefetch instructions for -# __builtin_prefetch. This includes -mcpu for targets that treat prefetch +# __builtin_prefetch. This includes -mtune for targets that treat prefetch # instructions as nops. set PREFETCH_SSE [list \ - { -mcpu=pentium3 } \ - { -mcpu=pentium4 } \ - { -mcpu=athlon } \ - { -mcpu=athlon-4 } \ + { -mtune=pentium3 } \ + { -mtune=pentium4 } \ + { -mtune=athlon } \ + { -mtune=athlon-4 } \ { -march=pentium3 } \ { -march=pentium4 } ] -- 2.30.2