Subject: Re: [PATCH 7/16] Early serial debug support for PPC44x

From: Alan Modra <[email-masked]>
Date: Wed, 14 Feb 2007 13:08:46 +1030

On Wed, Feb 14, 2007 at 01:02:51PM +1100, David Gibson wrote:
> On Wed, Feb 14, 2007 at 12:30:12PM +1030, Alan Modra wrote:
> > On Wed, Feb 14, 2007 at 12:00:44PM +1100, David Gibson wrote:
> > > On Tue, Feb 13, 2007 at 07:02:36PM -0600, Josh Boyer wrote:
> > > > On Wed, Feb 14, 2007 at 11:16:22AM +1100, David Gibson wrote:
> > > > > I'm using a 64-bit constant there, but for me at least the assembler
> > > > > is able to handle manipulating it in constant expressions.
> > > > 
> > > > [jwboyer@zod ~]$ powerpc-440-linux-gnu-as --version
> > > > GNU assembler 2.15
> > > > 
> > > > This is a crosstool built toolchain with binutils 2.15 and gcc 3.4.1.
> > > > Which versions are you using?
> > > 
> > > Hmm.. I appear to have binutils-2.17.  That could be it.
> > > 
> > > It would be nice to support the older binutils too, but I'm not sure
> > > how to get around this without considerable inconvenience.
> > 
> > I would guess that this isn't a matter of how old the assembler is,
> > but how the assembler was built.  If built on a 32-bit host with no
> > 64-bit targets supported, then most internal assembler variables
> > are 32-bit and 64-bit constants are not handled very well.
> > 
> > You probably should avoid 64-bit expressions on a 32-bit target.
> 
> Well, yes, but how.

No idea, but I haven't even looked at the code in question.  I'm just
pointing out the toolchain limitation.  It sounds like what you've
done requires that people build their binutils with
--enable-64-bit-bfd or choose support for an extra 64-bit target,
eg. --enable-targets=powerpc64-linux

>  This 32-bit target has 36-bit physical
> addresses.  All those expressions do is pull the high and low 32-bit
> words from literals.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre