Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2f

2012-10-19 Thread Mike Stump
Thanks.

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2f

2012-10-19 Thread Michael Meissner
I checked in your patch along with my patches into the trunk. [gcc] 2012-10-19 Michael Meissner Dominique Dhumieres * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Don't assume OPTION_MASK_STRICT_ALIGN is defined. (MASK_STRICT_ALIGN): If OPTION_MASK_STRIC

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2f

2012-10-19 Thread Dominique Dhumieres
> > Eric and Dominique could you try it on your respective systems? Thanks in > > advance. > > It works for me, thanks. It does not for me: In file included from ../../work/gcc/config/rs6000/rs6000.c:1475:0: ../../work/gcc/config/rs6000/rs6000-cpus.def:54:0: error: "MASK_STRICT_ALIGN" redefined

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2f

2012-10-19 Thread Eric Botcazou
> The patch builds in 32-bit on my powerpc64-linux system (which showed up > Eric's problem). I can't test the patch for Dominique's problem, since it > needs a non-linux system to show up. I verified the debug problem: > > Eric and Dominique could you try it on your respective systems? Thanks

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2f

2012-10-18 Thread David Edelsohn
On Thu, Oct 18, 2012 at 7:06 PM, Michael Meissner wrote: > 2012-10-18 Michael Meissner > > * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Don't assume > OPTION_MASK_STRICT_ALIGN is defined. > (MASK_STRICT_ALIGN): If OPTION_MASK_STRICT_ALIGN is not defined, > d

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2f

2012-10-18 Thread Michael Meissner
On Thu, Oct 18, 2012 at 05:35:39PM -0400, Michael Meissner wrote: > On Thu, Oct 18, 2012 at 09:08:34PM +0200, Dominique Dhumieres wrote: > > > 2012-10-17 Michael Meissner > > > > > > * config/rs6000/rs6000.opt (rs6000_isa_flags): New flag word to > > > replace target_flags that gives us 63

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2f

2012-10-18 Thread Michael Meissner
On Thu, Oct 18, 2012 at 09:08:34PM +0200, Dominique Dhumieres wrote: > > 2012-10-17 Michael Meissner > > > > * config/rs6000/rs6000.opt (rs6000_isa_flags): New flag word to > > replace target_flags that gives us 63 possible switches. > > (x_rs6000_isa_flags): Save area for rs6000_is

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2f

2012-10-18 Thread Mike Stump
On Oct 18, 2012, at 12:08 PM, Dominique Dhumieres wrote: > --- gcc/config/rs6000/rs6000.c2012-10-18 00:34:51.0 +0200 > +++ ../work/gcc/config/rs6000/rs6000.c2012-10-18 08:55:28.0 > +0200 > @@ -1123,6 +1123,7 @@ static const struct attribute_spec rs600 > > > #ifnd

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2f

2012-10-18 Thread Dominique Dhumieres
> 2012-10-17 Michael Meissner > > * config/rs6000/rs6000.opt (rs6000_isa_flags): New flag word to > replace target_flags that gives us 63 possible switches. > (x_rs6000_isa_flags): Save area for rs6000_isa_flags. > (x_rs6000_isa_flags_explicit): Save area for > ... Boot

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2f

2012-10-18 Thread Eric Botcazou
> 2012-10-17 Michael Meissner > > * config/rs6000/rs6000.opt (rs6000_isa_flags): New flag word to > replace target_flags that gives us 63 possible switches. > (x_rs6000_isa_flags): Save area for rs6000_isa_flags. > (x_rs6000_isa_flags_explicit): Save area for > rs6

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #4

2012-10-17 Thread Michael Meissner
On Wed, Oct 17, 2012 at 12:26:42AM +, Joseph S. Myers wrote: > On Tue, 16 Oct 2012, Michael Meissner wrote: > > > It occurs to me that now that we've committed to GCC being done in C++, we > > could just make global_options{,_set} be a class instead of a structure. So > > you could say: > >

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2f

2012-10-17 Thread David Edelsohn
Mike, This patch is okay with the appropriate changes to adapt to the common infrastructure improvements. We will continue to iterate on this. Are there any testcases that would be useful? A lot of other testcases use target flags, so those probably will point out problems. Thanks, David On Tu

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #4

2012-10-17 Thread Joseph S. Myers
On Tue, 16 Oct 2012, Michael Meissner wrote: > It occurs to me that now that we've committed to GCC being done in C++, we > could just make global_options{,_set} be a class instead of a structure. So > you could say: > > global_options.set_FOO (value) > > Or: > > global_options.set

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #4

2012-10-16 Thread Michael Meissner
On Tue, Oct 16, 2012 at 03:02:47PM +, Joseph S. Myers wrote: > That is: > > 1. Patch adding TARGET_FOO aliases for OPTION_FOO (small change to the awk > scripts and associated documentation, I expect). > > 2. Large, mechanical, automatically generated patch to change existing > OPTION_FOO us

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #4

2012-10-16 Thread Joseph S. Myers
On Mon, 15 Oct 2012, Michael Meissner wrote: > > I think changing the names is safer - it's immediately obvious as a build > > failure if you missed anything. If you have MASK_* names for bits in more > > than one flags variable, there's a risk of accidentally testing a bit in > > the wrong va

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #4

2012-10-15 Thread Michael Meissner
On Mon, Oct 15, 2012 at 03:52:01PM +, Joseph S. Myers wrote: > On Fri, 12 Oct 2012, Michael Meissner wrote: > > > I decided to see if it was possible to simplify the change over by adding > > another flag word in the .opt handling to give the old names (TARGET_ > > and > > MASK_). For Joseph

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #4

2012-10-15 Thread Joseph S. Myers
On Fri, 12 Oct 2012, Michael Meissner wrote: > I decided to see if it was possible to simplify the change over by adding > another flag word in the .opt handling to give the old names (TARGET_ and > MASK_). For Joseph Myers and Neil Booth, the issue is when changing all > of the switches that use

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #4

2012-10-12 Thread Michael Meissner
I decided to see if it was possible to simplify the change over by adding another flag word in the .opt handling to give the old names (TARGET_ and MASK_). For Joseph Myers and Neil Booth, the issue is when changing all of the switches that use Mask(xxx) and InverseMask(xxx) to also use Var(xxx),

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2e

2012-10-09 Thread David Edelsohn
On Tue, Oct 9, 2012 at 7:20 PM, Michael Meissner wrote: > This patch adds more debugging via -mdebug=reg to the compiler, and it is the > main way I verified that all of the options were set correctly. If you do not > use -mdebug=reg, this patch has no effect. When I emailed this patch, I had >

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2d

2012-10-09 Thread David Edelsohn
On Tue, Oct 9, 2012 at 7:01 PM, Michael Meissner wrote: > This patch is a preparation patch for the main infrastructure patch. It > changes the types of the builtin masks and target options from unsigned/signed > int to HOST_WIDE_INT. I built this with #2c also installed (but the two > patches a

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2c

2012-10-09 Thread David Edelsohn
On Tue, Oct 9, 2012 at 6:58 PM, Michael Meissner wrote: > Ok, David preferred the 2 series of patches which replace all of the flags in > target_flags to rs6000_isa_flags to the 3 series of patches, which started > over, and added a new flag word, but did not change the existing options. > > In an

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2e

2012-10-09 Thread Michael Meissner
This patch adds more debugging via -mdebug=reg to the compiler, and it is the main way I verified that all of the options were set correctly. If you do not use -mdebug=reg, this patch has no effect. When I emailed this patch, I had bootstraped the compiler, and I was beginning to do make check.

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2d

2012-10-09 Thread Michael Meissner
This patch is a preparation patch for the main infrastructure patch. It changes the types of the builtin masks and target options from unsigned/signed int to HOST_WIDE_INT. I built this with #2c also installed (but the two patches are independent). It bootstraped and had no regressions. Is it o

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2c

2012-10-09 Thread Michael Meissner
Ok, David preferred the 2 series of patches which replace all of the flags in target_flags to rs6000_isa_flags to the 3 series of patches, which started over, and added a new flag word, but did not change the existing options. In an effort to simplify the main patch, I'm going to push out some of

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2c

2012-10-06 Thread Gunther Nikl
Michael Meissner wrote: > On Thu, Oct 04, 2012 at 06:33:33PM +0200, Gunther Nikl wrote: >> Michael Meissner schrieb: >>> On Tue, Oct 02, 2012 at 10:13:25AM +0200, Gunther Nikl wrote: Michael Meissner wrote: > Segher Boessenkool asked me on IRC to break out the fix in the last > change

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #3

2012-10-06 Thread Gunther Nikl
Michael Meissner wrote: > @@ -10326,7 +10352,7 @@ static rtx > altivec_expand_ld_builtin (tree exp, rtx target, bool *expandedp) > { >tree fndecl = TREE_OPERAND (CALL_EXPR_FN (exp), 0); > - unsigned int fcode = DECL_FUNCTION_CODE (fndecl); > + enum rs6000_builtins fcode = (enum rs6000_built

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2b

2012-10-05 Thread Michael Meissner
On Wed, Oct 03, 2012 at 09:42:05PM -0400, David Edelsohn wrote: > @@ -1115,7 +1118,8 @@ static const struct attribute_spec rs600 >{ NULL,0, 0, false, false, false, NULL, false } > }; > > -#ifndef MASK_STRICT_ALIGN > +#ifndef OPTION_MASK_STRICT_ALIGN > +#define OPTION_MASK_STRICT_ALI

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #3

2012-10-05 Thread Michael Meissner
I've rewritten my rs6000 infrastructure patch to allow more target switches, so that it does not change the flags currently in the target_flags. This should reduce the number of changes due to TARGET_ being called OPTION_, and MASK_ being called OPTION_MASK_. In addition, since it might be possib

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2b

2012-10-05 Thread Michael Meissner
On Wed, Oct 03, 2012 at 09:42:05PM -0400, David Edelsohn wrote: > @@ -1115,7 +1118,8 @@ static const struct attribute_spec rs600 >{ NULL,0, 0, false, false, false, NULL, false } > }; > > -#ifndef MASK_STRICT_ALIGN > +#ifndef OPTION_MASK_STRICT_ALIGN > +#define OPTION_MASK_STRICT_ALI

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2c

2012-10-05 Thread Michael Meissner
On Thu, Oct 04, 2012 at 06:33:33PM +0200, Gunther Nikl wrote: > Michael Meissner schrieb: > > On Tue, Oct 02, 2012 at 10:13:25AM +0200, Gunther Nikl wrote: > >> Michael Meissner wrote: > >>> Segher Boessenkool asked me on IRC to break out the fix in the last > >>> change. > >>> This patch is just

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2c

2012-10-04 Thread Gunther Nikl
Michael Meissner schrieb: > On Tue, Oct 02, 2012 at 10:13:25AM +0200, Gunther Nikl wrote: >> Michael Meissner wrote: >>> Segher Boessenkool asked me on IRC to break out the fix in the last change. >>> This patch is just the change to set the default options if the user did not >>> use -mcpu= and th

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2b

2012-10-03 Thread David Edelsohn
@@ -1115,7 +1118,8 @@ static const struct attribute_spec rs600 { NULL,0, 0, false, false, false, NULL, false } }; -#ifndef MASK_STRICT_ALIGN +#ifndef OPTION_MASK_STRICT_ALIGN +#define OPTION_MASK_STRICT_ALIGN 0 #define MASK_STRICT_ALIGN 0 #endif #ifndef TARGET_PROFILE_KERNEL Why

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2d

2012-10-02 Thread David Edelsohn
On Mon, Oct 1, 2012 at 7:11 PM, Michael Meissner wrote: > 2012-10-01 Michael Meissner > > * config/rs6000/rs6000.c (rs6000_option_override_internal): If > -mcpu= is not specified and the compiler is not configured > using --with-cpu=, use the bits from the TARGET_DEFAULT

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2c

2012-10-02 Thread Michael Meissner
On Tue, Oct 02, 2012 at 10:13:25AM +0200, Gunther Nikl wrote: > Michael Meissner wrote: > > Segher Boessenkool asked me on IRC to break out the fix in the last change. > > This patch is just the change to set the default options if the user did not > > use -mcpu= and the compiler was not configured

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2c

2012-10-02 Thread Gunther Nikl
Michael Meissner wrote: > Segher Boessenkool asked me on IRC to break out the fix in the last change. > This patch is just the change to set the default options if the user did not > use -mcpu= and the compiler was not configured with --with-cpu=. > Here are the patches. Which GCC releases are aff

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2d

2012-10-01 Thread Michael Meissner
2012-10-01 Michael Meissner * config/rs6000/rs6000.c (rs6000_option_override_internal): If -mcpu= is not specified and the compiler is not configured using --with-cpu=, use the bits from the TARGET_DEFAULT to set the initial options. I reworked the patch to allo

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2c

2012-09-28 Thread Michael Meissner
Segher Boessenkool asked me on IRC to break out the fix in the last change. This patch is just the change to set the default options if the user did not use -mcpu= and the compiler was not configured with --with-cpu=. Here are the patches. I can submit this patch first if David desires, and then r

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2

2012-09-27 Thread Michael Meissner
This patch fixes a long standing bug that David noticed, namely if you don't use -mcpu=, the target options that are set by the configuration .h files in TARGET_DEFAULT are cleared if they are in POWERPC_MASKS. Note, if you configure the compiler using --with-cpu=, it provides a default cpu, so us

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch

2012-09-19 Thread Michael Meissner
On Tue, Sep 18, 2012 at 08:04:06PM -0400, David Edelsohn wrote: > On Mon, Sep 17, 2012 at 3:51 PM, Michael Meissner > wrote: > > This patch has support for all of the additonal cleanups I mentioned in the > > first patch that I hadn't gotten to. At this point, I am not planning any > > more > >

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch

2012-09-18 Thread David Edelsohn
On Mon, Sep 17, 2012 at 3:51 PM, Michael Meissner wrote: > This patch has support for all of the additonal cleanups I mentioned in the > first patch that I hadn't gotten to. At this point, I am not planning any > more > enhancements to the patch, and I would like to check it in. > > On my 64-bit