* powerpc rs6000_explicit_options change help request
@ 2011-11-08 8:10 Joel Sherrill
2011-11-08 8:32 ` Ralf Corsepius
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Joel Sherrill @ 2011-11-08 8:10 UTC (permalink / raw)
To: gcc
Hi,
powerpc-rtems does not compile on the head due
to what appear to be changes in the way CPU
features are represented for the arguments.
The compilation error is:
/users/joel/test-gcc/gcc-svn/gcc/config/rs6000/rs6000.c -o rs6000.o
/users/joel/test-gcc/gcc-svn/gcc/config/rs6000/rs6000.c: In function
‘rs6000_option_override_internal’:
/users/joel/test-gcc/gcc-svn/gcc/config/rs6000/rs6000.c:2826:3: error:
‘rs6000_explicit_options’ undeclared (first use in this function)
/users/joel/test-gcc/gcc-svn/gcc/config/rs6000/rs6000.c:2826:3: note:
each undeclared identifier is reported only once for each function it
appears in
At top level:
The code is in rtems.h is currently:
if (TARGET_E500) \
{ \
if (TARGET_HARD_FLOAT && !rs6000_explicit_options.float_gprs) \
rs6000_float_gprs = 1; \
if (rs6000_float_gprs != 0 && !rs6000_explicit_options.spe) \
rs6000_spe = 1; \
if (rs6000_spe && !rs6000_explicit_options.spe_abi) \
rs6000_spe_abi = 1; \
} \
I think that changes to something like:
if (TARGET_E500) \
{ \
if (!global_options_set.x_rs6000_float_gprs) \
rs6000_float_gprs = 1; \
if (!global_options_set.x_rs6000_spe) \
rs6000_spe = 1; \
if (!global_options_set.x_rs6000_spe_abi) \
rs6000_spe_abi = 1; \
} \
That compiles but I wanted a sanity check that it is the right
transformation.
Thanks.
--joel sherrill
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: powerpc rs6000_explicit_options change help request
2011-11-08 8:10 powerpc rs6000_explicit_options change help request Joel Sherrill
@ 2011-11-08 8:32 ` Ralf Corsepius
2011-11-08 20:08 ` David Edelsohn
2011-11-08 20:50 ` Michael Meissner
2 siblings, 0 replies; 4+ messages in thread
From: Ralf Corsepius @ 2011-11-08 8:32 UTC (permalink / raw)
To: Joel Sherrill; +Cc: gcc
On 11/08/2011 04:44 AM, Joel Sherrill wrote:
> Hi,
>
> powerpc-rtems does not compile on the head due
> to what appear to be changes in the way CPU
> features are represented for the arguments.
>
> The compilation error is:
>
> /users/joel/test-gcc/gcc-svn/gcc/config/rs6000/rs6000.c -o rs6000.o
> /users/joel/test-gcc/gcc-svn/gcc/config/rs6000/rs6000.c: In function
> ârs6000_option_override_internalâ:
> /users/joel/test-gcc/gcc-svn/gcc/config/rs6000/rs6000.c:2826:3: error:
> ârs6000_explicit_optionsâ undeclared (first use in this function)
> /users/joel/test-gcc/gcc-svn/gcc/config/rs6000/rs6000.c:2826:3: note:
> each undeclared identifier is reported only once for each function it
> appears in
> At top level:
>
> The code is in rtems.h is currently:
>
> if (TARGET_E500) \
> { \
> if (TARGET_HARD_FLOAT && !rs6000_explicit_options.float_gprs) \
> rs6000_float_gprs = 1; \
> if (rs6000_float_gprs != 0 && !rs6000_explicit_options.spe) \
> rs6000_spe = 1; \
> if (rs6000_spe && !rs6000_explicit_options.spe_abi) \
> rs6000_spe_abi = 1; \
> } \
>
> I think that changes to something like:
>
> if (TARGET_E500) \
> { \
> if (!global_options_set.x_rs6000_float_gprs) \
> rs6000_float_gprs = 1; \
> if (!global_options_set.x_rs6000_spe) \
> rs6000_spe = 1; \
> if (!global_options_set.x_rs6000_spe_abi) \
> rs6000_spe_abi = 1; \
> } \
>
> That compiles but I wanted a sanity check that it is the right
> transformation.
I am not sure, either, but your code matches what other files being
found in GCC trunk.
I so far have been experimenting with a less intrusive patch:
diff --git a/gcc/config/rs6000/rtems.h b/gcc/config/rs6000/rtems.h
index 2c0c73b..6c36e94 100644
--- a/gcc/config/rs6000/rtems.h
+++ b/gcc/config/rs6000/rtems.h
@@ -61,11 +61,11 @@
do { \
if (TARGET_E500) \
{
\
- if (TARGET_HARD_FLOAT && !rs6000_explicit_options.float_gprs) \
+ if (TARGET_HARD_FLOAT &&
!global_options_set.x_rs6000_float_gprs) \
rs6000_float_gprs = 1; \
- if (rs6000_float_gprs != 0 && !rs6000_explicit_options.spe) \
+ if (rs6000_float_gprs != 0 && !global_options_set.x_rs6000_spe)
\
rs6000_spe = 1; \
- if (rs6000_spe && !rs6000_explicit_options.spe_abi) \
+ if (rs6000_spe && !global_options_set.x_rs6000_spe_abi)
\
rs6000_spe_abi = 1; \
}
\
} while(0)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: powerpc rs6000_explicit_options change help request
2011-11-08 8:10 powerpc rs6000_explicit_options change help request Joel Sherrill
2011-11-08 8:32 ` Ralf Corsepius
@ 2011-11-08 20:08 ` David Edelsohn
2011-11-08 20:50 ` Michael Meissner
2 siblings, 0 replies; 4+ messages in thread
From: David Edelsohn @ 2011-11-08 20:08 UTC (permalink / raw)
To: Joel Sherrill, Joseph S. Myers; +Cc: gcc
On Mon, Nov 7, 2011 at 10:44 PM, Joel Sherrill
<joel.sherrill@oarcorp.com> wrote:
> Hi,
>
> powerpc-rtems does not compile on the head due
> to what appear to be changes in the way CPU
> features are represented for the arguments.
>
> The compilation error is:
>
> /users/joel/test-gcc/gcc-svn/gcc/config/rs6000/rs6000.c -o rs6000.o
> /users/joel/test-gcc/gcc-svn/gcc/config/rs6000/rs6000.c: In function
> ‘rs6000_option_override_internal’:
> /users/joel/test-gcc/gcc-svn/gcc/config/rs6000/rs6000.c:2826:3: error:
> ‘rs6000_explicit_options’ undeclared (first use in this function)
> /users/joel/test-gcc/gcc-svn/gcc/config/rs6000/rs6000.c:2826:3: note: each
> undeclared identifier is reported only once for each function it appears in
It looks like this was missed by Joseph during his change.
- David
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: powerpc rs6000_explicit_options change help request
2011-11-08 8:10 powerpc rs6000_explicit_options change help request Joel Sherrill
2011-11-08 8:32 ` Ralf Corsepius
2011-11-08 20:08 ` David Edelsohn
@ 2011-11-08 20:50 ` Michael Meissner
2 siblings, 0 replies; 4+ messages in thread
From: Michael Meissner @ 2011-11-08 20:50 UTC (permalink / raw)
To: Joel Sherrill; +Cc: gcc
On Mon, Nov 07, 2011 at 09:44:25PM -0600, Joel Sherrill wrote:
> Hi,
>
> powerpc-rtems does not compile on the head due
> to what appear to be changes in the way CPU
> features are represented for the arguments.
>
> The compilation error is:
>
> /users/joel/test-gcc/gcc-svn/gcc/config/rs6000/rs6000.c -o rs6000.o
> /users/joel/test-gcc/gcc-svn/gcc/config/rs6000/rs6000.c: In function
> ârs6000_option_override_internalâ:
> /users/joel/test-gcc/gcc-svn/gcc/config/rs6000/rs6000.c:2826:3:
> error: ârs6000_explicit_optionsâ undeclared (first use in this
> function)
> /users/joel/test-gcc/gcc-svn/gcc/config/rs6000/rs6000.c:2826:3:
> note: each undeclared identifier is reported only once for each
> function it appears in
> At top level:
>
> The code is in rtems.h is currently:
>
> if (TARGET_E500) \
> { \
> if (TARGET_HARD_FLOAT && !rs6000_explicit_options.float_gprs) \
> rs6000_float_gprs = 1; \
> if (rs6000_float_gprs != 0 && !rs6000_explicit_options.spe) \
> rs6000_spe = 1; \
> if (rs6000_spe && !rs6000_explicit_options.spe_abi) \
> rs6000_spe_abi = 1; \
> } \
>
> I think that changes to something like:
>
> if (TARGET_E500) \
> { \
> if (!global_options_set.x_rs6000_float_gprs) \
> rs6000_float_gprs = 1; \
> if (!global_options_set.x_rs6000_spe) \
> rs6000_spe = 1; \
> if (!global_options_set.x_rs6000_spe_abi) \
> rs6000_spe_abi = 1; \
> } \
>
> That compiles but I wanted a sanity check that it is the right
> transformation.
Yes, this is the right transformation. Here is an untested patch that fixes
it:
2011-11-08 Michael Meissner <meissner@linux.vnet.ibm.com>
* config/rs6000/rtems.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Use
global_options_set instead of rs6000_explicit_options, which was
removed on May 5th.
Index: gcc/config/rs6000/rtems.h
===================================================================
--- gcc/config/rs6000/rtems.h (revision 181174)
+++ gcc/config/rs6000/rtems.h (working copy)
@@ -61,11 +61,11 @@
do { \
if (TARGET_E500) \
{ \
- if (TARGET_HARD_FLOAT && !rs6000_explicit_options.float_gprs) \
+ if (TARGET_HARD_FLOAT && !global_options_set.x_float_gprs) \
rs6000_float_gprs = 1; \
- if (rs6000_float_gprs != 0 && !rs6000_explicit_options.spe) \
+ if (rs6000_float_gprs != 0 && !global_options_set.x_spe) \
rs6000_spe = 1; \
- if (rs6000_spe && !rs6000_explicit_options.spe_abi) \
+ if (rs6000_spe && !global_options_set.x_spe_abi) \
rs6000_spe_abi = 1; \
} \
} while(0)
--
Michael Meissner, IBM
5 Technology Place Drive, M/S 2757, Westford, MA 01886-3141, USA
meissner@linux.vnet.ibm.com fax +1 (978) 399-6899
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-11-08 19:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-08 8:10 powerpc rs6000_explicit_options change help request Joel Sherrill
2011-11-08 8:32 ` Ralf Corsepius
2011-11-08 20:08 ` David Edelsohn
2011-11-08 20:50 ` Michael Meissner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).