Patchwork [22/25] Specs cleanup: -msse5

login
register
mail settings
Submitter Joseph S. Myers
Date Jan. 14, 2011, 12:19 a.m.
Message ID <Pine.LNX.4.64.1101140017460.6059@digraph.polyomino.org.uk>
Download mbox | patch
Permalink /patch/78850/
State New
Headers show

Comments

Joseph S. Myers - Jan. 14, 2011, 12:19 a.m.
config/i386/i386.h makes -msse5 into an alias for -mavx, that gives a
warning, via specs.  But this doesn't actually work, since the
original option is still passed to cc1 and gives an error for not
being in a .opt file.

Presuming the intent was not to give an error, this patch changes
-msse5 into an alias in the .opt file.  OK to commit?

2011-01-13  Joseph Myers  <joseph@codesourcery.com>

	* config/i386/i386.h (CC1_CPU_SPEC_1): Don't handle -msse5.
	* config/i386/i386.opt (msse5): New Alias.
Richard Guenther - Jan. 14, 2011, 10:13 a.m.
On Fri, Jan 14, 2011 at 1:19 AM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> config/i386/i386.h makes -msse5 into an alias for -mavx, that gives a
> warning, via specs.  But this doesn't actually work, since the
> original option is still passed to cc1 and gives an error for not
> being in a .opt file.
>
> Presuming the intent was not to give an error, this patch changes
> -msse5 into an alias in the .opt file.  OK to commit?

Ok.

Thanks,
Richard.

> 2011-01-13  Joseph Myers  <joseph@codesourcery.com>
>
>        * config/i386/i386.h (CC1_CPU_SPEC_1): Don't handle -msse5.
>        * config/i386/i386.opt (msse5): New Alias.
>
> diff -rupN --exclude=.svn gcc-mainline-21/gcc/config/i386/i386.h gcc-mainline/gcc/config/i386/i386.h
> --- gcc-mainline-21/gcc/config/i386/i386.h      2011-01-07 13:21:15.000000000 -0800
> +++ gcc-mainline/gcc/config/i386/i386.h 2011-01-12 15:08:42.000000000 -0800
> @@ -553,9 +553,7 @@ extern const char *host_detect_local_cpu
>  /* Specs for the compiler proper */
>
>  #ifndef CC1_CPU_SPEC
> -#define CC1_CPU_SPEC_1 "\
> -%{msse5:-mavx \
> -%n'-msse5' was removed\n}"
> +#define CC1_CPU_SPEC_1 ""
>
>  #ifndef HAVE_LOCAL_CPU_DETECT
>  #define CC1_CPU_SPEC CC1_CPU_SPEC_1
> diff -rupN --exclude=.svn gcc-mainline-21/gcc/config/i386/i386.opt gcc-mainline/gcc/config/i386/i386.opt
> --- gcc-mainline-21/gcc/config/i386/i386.opt    2010-11-12 15:28:10.000000000 -0800
> +++ gcc-mainline/gcc/config/i386/i386.opt       2011-01-12 15:08:05.000000000 -0800
> @@ -320,6 +320,10 @@ mno-sse4
>  Target RejectNegative Report InverseMask(ISA_SSE4_1) MaskExists Var(ix86_isa_flags) Save
>  Do not support SSE4.1 and SSE4.2 built-in functions and code generation
>
> +msse5
> +Target Undocumented Alias(mavx) Warn(%<-msse5%> was removed)
> +;; Deprecated
> +
>  mavx
>  Target Report Mask(ISA_AVX) Var(ix86_isa_flags)
>  Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2 and AVX built-in functions and code generation
>
> --
> Joseph S. Myers
> joseph@codesourcery.com
>

Patch

diff -rupN --exclude=.svn gcc-mainline-21/gcc/config/i386/i386.h gcc-mainline/gcc/config/i386/i386.h
--- gcc-mainline-21/gcc/config/i386/i386.h	2011-01-07 13:21:15.000000000 -0800
+++ gcc-mainline/gcc/config/i386/i386.h	2011-01-12 15:08:42.000000000 -0800
@@ -553,9 +553,7 @@  extern const char *host_detect_local_cpu
 /* Specs for the compiler proper */
 
 #ifndef CC1_CPU_SPEC
-#define CC1_CPU_SPEC_1 "\
-%{msse5:-mavx \
-%n'-msse5' was removed\n}"
+#define CC1_CPU_SPEC_1 ""
 
 #ifndef HAVE_LOCAL_CPU_DETECT
 #define CC1_CPU_SPEC CC1_CPU_SPEC_1
diff -rupN --exclude=.svn gcc-mainline-21/gcc/config/i386/i386.opt gcc-mainline/gcc/config/i386/i386.opt
--- gcc-mainline-21/gcc/config/i386/i386.opt	2010-11-12 15:28:10.000000000 -0800
+++ gcc-mainline/gcc/config/i386/i386.opt	2011-01-12 15:08:05.000000000 -0800
@@ -320,6 +320,10 @@  mno-sse4
 Target RejectNegative Report InverseMask(ISA_SSE4_1) MaskExists Var(ix86_isa_flags) Save
 Do not support SSE4.1 and SSE4.2 built-in functions and code generation
 
+msse5
+Target Undocumented Alias(mavx) Warn(%<-msse5%> was removed)
+;; Deprecated
+
 mavx
 Target Report Mask(ISA_AVX) Var(ix86_isa_flags)
 Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2 and AVX built-in functions and code generation