public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* possible powerpc 40x problem in 2.12
@ 2002-02-28 15:27 Joel Sherrill
  2002-02-28 16:59 ` Daniel Jacobowitz
  0 siblings, 1 reply; 8+ messages in thread
From: Joel Sherrill @ 2002-02-28 15:27 UTC (permalink / raw)
  To: binutils


Hi,

I tried to build all of the RTEMS configurations using
the same binutils 2.12 source I reported results on 
earlier and have gotten a failure on the ppc40x targets
because the following instructions are recognized.  This
is with gcc 2.95.3 on top of the gas and I think something
is not quite in sync because -mcpu=403 is resulting in
-mppc being passed to gas.  With that, it doesn't like
the mfdcr and mtdcr instructions and claims them as illegal.

Should I be using a different gcc CPU CFLAG or is
this a case where binutils 2.12 is intended to be 
using with gcc 3.x?

Thanks.

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: possible powerpc 40x problem in 2.12
  2002-02-28 15:27 possible powerpc 40x problem in 2.12 Joel Sherrill
@ 2002-02-28 16:59 ` Daniel Jacobowitz
  2002-02-28 22:42   ` Alan Modra
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2002-02-28 16:59 UTC (permalink / raw)
  To: Joel Sherrill; +Cc: binutils

On Thu, Feb 28, 2002 at 05:08:12PM -0600, Joel Sherrill wrote:
> 
> Hi,
> 
> I tried to build all of the RTEMS configurations using
> the same binutils 2.12 source I reported results on 
> earlier and have gotten a failure on the ppc40x targets
> because the following instructions are recognized.  This
> is with gcc 2.95.3 on top of the gas and I think something
> is not quite in sync because -mcpu=403 is resulting in
> -mppc being passed to gas.  With that, it doesn't like
> the mfdcr and mtdcr instructions and claims them as illegal.
> 
> Should I be using a different gcc CPU CFLAG or is
> this a case where binutils 2.12 is intended to be 
> using with gcc 3.x?
> 
> Thanks.

Ugh.  GCC 3.x also passes -mppc in response to -mcpu=403.  I believe
the root of this is the fact that the instruction is assembled
differently on PowerPC and BookE processors (although I can't see
evidence of that in opcodes/ppc-dis.c...).

I believe, if you want to use the 403-specific instructions (which GCC
won't generate) then you need a -Wa,-m403 option (is that the right
one?).  The assembler is generally less permissive about these things.
It may make sense to get GCC patched to pass a different option after
2.12 is released.

Is there a PPC guru in the house?  Am I on track here?


-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: possible powerpc 40x problem in 2.12
  2002-02-28 16:59 ` Daniel Jacobowitz
@ 2002-02-28 22:42   ` Alan Modra
       [not found]     ` <3C7F6FE8.F8FCBAE3@OARcorp.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Modra @ 2002-02-28 22:42 UTC (permalink / raw)
  To: Joel Sherrill, binutils

On Thu, Feb 28, 2002 at 06:33:33PM -0500, Daniel Jacobowitz wrote:
> 
> Ugh.  GCC 3.x also passes -mppc in response to -mcpu=403.  I believe
> the root of this is the fact that the instruction is assembled
> differently on PowerPC and BookE processors (although I can't see
> evidence of that in opcodes/ppc-dis.c...).

Yes, the change requiring -m403 was checked in 2001-10-12 as part of
mrg's booke patch.  Before that, there was no PPC_OPCODE_403.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: possible powerpc 40x problem in 2.12
       [not found]     ` <3C7F6FE8.F8FCBAE3@OARcorp.com>
@ 2002-03-01  5:02       ` Alan Modra
  2002-03-01  9:39         ` Joel Sherrill
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Modra @ 2002-03-01  5:02 UTC (permalink / raw)
  To: Joel Sherrill; +Cc: binutils

On Fri, Mar 01, 2002 at 06:11:20AM -0600, Joel Sherrill wrote:
> 
> Could you point me to where the gcc cpu cflags are translated into
> gas flags in gcc so I can put together a patch and submit it?  This
> is a new one for me but I am happy to try to fix it. :)

In this case, gcc/config/rs6000/rs6000.h:ASM_CPU_SPEC

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: possible powerpc 40x problem in 2.12
  2002-03-01  5:02       ` Alan Modra
@ 2002-03-01  9:39         ` Joel Sherrill
  2002-03-01 10:52           ` Daniel Jacobowitz
  0 siblings, 1 reply; 8+ messages in thread
From: Joel Sherrill @ 2002-03-01  9:39 UTC (permalink / raw)
  To: Alan Modra; +Cc: binutils



Alan Modra wrote:
> 
> On Fri, Mar 01, 2002 at 06:11:20AM -0600, Joel Sherrill wrote:
> >
> > Could you point me to where the gcc cpu cflags are translated into
> > gas flags in gcc so I can put together a patch and submit it?  This
> > is a new one for me but I am happy to try to fix it. :)
> 
> In this case, gcc/config/rs6000/rs6000.h:ASM_CPU_SPEC

Thank you.  It really wasn't that hard to decipher once I knew where
to look. :)

It currently has

%{mcpu=403: -mppc} \

and should be changed to

%{mcpu=403: -m403} \
%{mcpu=405: -m405} \

Right?

Also gcc does not appear to know anything about the -m74xx set of
switches.  Should it?  I know RTEMS uses inline assembly that
makes this matter sometimes.


> --
> Alan Modra
> IBM OzLabs - Linux Technology Centre

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: possible powerpc 40x problem in 2.12
  2002-03-01  9:39         ` Joel Sherrill
@ 2002-03-01 10:52           ` Daniel Jacobowitz
  2002-03-01 11:04             ` Joel Sherrill
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2002-03-01 10:52 UTC (permalink / raw)
  To: Joel Sherrill; +Cc: Alan Modra, binutils

On Fri, Mar 01, 2002 at 11:39:34AM -0600, Joel Sherrill wrote:
> 
> 
> Alan Modra wrote:
> > 
> > On Fri, Mar 01, 2002 at 06:11:20AM -0600, Joel Sherrill wrote:
> > >
> > > Could you point me to where the gcc cpu cflags are translated into
> > > gas flags in gcc so I can put together a patch and submit it?  This
> > > is a new one for me but I am happy to try to fix it. :)
> > 
> > In this case, gcc/config/rs6000/rs6000.h:ASM_CPU_SPEC
> 
> Thank you.  It really wasn't that hard to decipher once I knew where
> to look. :)
> 
> It currently has
> 
> %{mcpu=403: -mppc} \
> 
> and should be changed to
> 
> %{mcpu=403: -m403} \
> %{mcpu=405: -m405} \
> 
> Right?
> 
> Also gcc does not appear to know anything about the -m74xx set of
> switches.  Should it?  I know RTEMS uses inline assembly that
> makes this matter sometimes.

Yes, it probably should... these changes should wait until 2.12 is
released, as they add a dependency on the existence of those flags. 
Ugh.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: possible powerpc 40x problem in 2.12
  2002-03-01 10:52           ` Daniel Jacobowitz
@ 2002-03-01 11:04             ` Joel Sherrill
  2002-03-01 15:41               ` Alan Modra
  0 siblings, 1 reply; 8+ messages in thread
From: Joel Sherrill @ 2002-03-01 11:04 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Alan Modra, binutils



Daniel Jacobowitz wrote:
> 
> On Fri, Mar 01, 2002 at 11:39:34AM -0600, Joel Sherrill wrote:
> >
> >
> > Alan Modra wrote:
> > >
> > > On Fri, Mar 01, 2002 at 06:11:20AM -0600, Joel Sherrill wrote:
> > > >
> > > > Could you point me to where the gcc cpu cflags are translated into
> > > > gas flags in gcc so I can put together a patch and submit it?  This
> > > > is a new one for me but I am happy to try to fix it. :)
> > >
> > > In this case, gcc/config/rs6000/rs6000.h:ASM_CPU_SPEC
> >
> > Thank you.  It really wasn't that hard to decipher once I knew where
> > to look. :)
> >
> > It currently has
> >
> > %{mcpu=403: -mppc} \
> >
> > and should be changed to
> >
> > %{mcpu=403: -m403} \
> > %{mcpu=405: -m405} \
> >
> > Right?
> >
> > Also gcc does not appear to know anything about the -m74xx set of
> > switches.  Should it?  I know RTEMS uses inline assembly that
> > makes this matter sometimes.
> 
> Yes, it probably should... these changes should wait until 2.12 is
> released, as they add a dependency on the existence of those flags.
> Ugh.

Double ugh.  Since gcc 3.0.4 was just released. 

Are there any other know binutils/gcc synchronization problems?  I think
gcc 3.0.4 was intended to be the end of the gcc 3.0.x releases but 
binutils and gcc 3.0.4 have enough synchronization problems, it might
be worth discussing a 3.0.5 just so the two GNU projects co-exist
nicely. 

> --
> Daniel Jacobowitz                           Carnegie Mellon University
> MontaVista Software                         Debian GNU/Linux Developer

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: possible powerpc 40x problem in 2.12
  2002-03-01 11:04             ` Joel Sherrill
@ 2002-03-01 15:41               ` Alan Modra
  0 siblings, 0 replies; 8+ messages in thread
From: Alan Modra @ 2002-03-01 15:41 UTC (permalink / raw)
  To: Joel Sherrill; +Cc: Daniel Jacobowitz, binutils

On Fri, Mar 01, 2002 at 01:06:04PM -0600, Joel Sherrill wrote:
> Daniel Jacobowitz wrote:
> > On Fri, Mar 01, 2002 at 11:39:34AM -0600, Joel Sherrill wrote:
> > >
> > > and should be changed to
> > >
> > > %{mcpu=403: -m403} \
> > > %{mcpu=405: -m405} \
> > >
> > > Right?
> > >
> > > Also gcc does not appear to know anything about the -m74xx set of
> > > switches.  Should it?  I know RTEMS uses inline assembly that
> > > makes this matter sometimes.
> > 
> > Yes, it probably should... these changes should wait until 2.12 is
> > released, as they add a dependency on the existence of those flags.
> > Ugh.
> 
> Double ugh.  Since gcc 3.0.4 was just released. 

gas recognized -m7410, -m7450 and -m7455 after 2001-10-12
-m405 after 2000-08-30
-m7400 after 2000-05-03

so the -m403/405 change to gcc only requires binutils-2.11  A pity this
change didn't make it into gcc-3.0.4.  gcc-3.1 will soon be released...

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-03-01 23:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-28 15:27 possible powerpc 40x problem in 2.12 Joel Sherrill
2002-02-28 16:59 ` Daniel Jacobowitz
2002-02-28 22:42   ` Alan Modra
     [not found]     ` <3C7F6FE8.F8FCBAE3@OARcorp.com>
2002-03-01  5:02       ` Alan Modra
2002-03-01  9:39         ` Joel Sherrill
2002-03-01 10:52           ` Daniel Jacobowitz
2002-03-01 11:04             ` Joel Sherrill
2002-03-01 15:41               ` Alan Modra

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).