linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: linux-sh@vger.kernel.org
Subject: Re: Recent assembler sign extension patch
Date: Fri, 29 Jan 2010 07:53:59 +0000	[thread overview]
Message-ID: <201001290153.59940.rob@landley.net> (raw)
In-Reply-To: <20090827132813.GB4668@console-pimps.org>

On Wednesday 27 January 2010 01:55:42 Paul Mundt wrote:
> On Wed, Jan 27, 2010 at 01:29:36AM -0600, Rob Landley wrote:
> > On Monday 25 January 2010 21:22:08 you wrote:
> > > On Sat, Jan 23, 2010 at 06:16:06AM -0600, Rob Landley wrote:
> > > > I get this error:
> > > >
> > > > arch/sh/kernel/cpu/sh4/../sh3/entry.S: Assembler messages:
> > > > arch/sh/kernel/cpu/sh4/../sh3/entry.S:260: Error: value of
> > > > 00000000fffffff0 too large for field of 2 bytes at 00000000000000a0
> > > > arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:60: Error: value
> > > > of 00000000fffffff0 too large for field of 2 bytes at
> > > > 00000000000000c8
> > > > arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:172: Error: value
> > > > of 00000000fffffff0 too large for field of 2 bytes at
> > > > 000000000000013e
> > > > arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:320: Error: value
> > > > of 00000000fffffff0 too large for field of 2 bytes at
> > > > 00000000000001da make[3]: *** [arch/sh/kernel/cpu/sh4/../sh3/entry.o]
> > > > Error 1
> > >
> > > See the http://www.spinics.net/lists/linux-sh/msg03499.html thread.
> >
> > I'm sorry, what was the resolution?  Changing the compiler means the
> > kernel no longer compiles with any existing gcc release from here
> > forward.  Also, I applied the patch from
> > http://www.spinics.net/lists/linux-sh/msg03505.html to binutils 2.17 (the
> > last gplv2 release), which changed the error to:
>
> At what point in this thread was the compiler even mentioned? The entire
> topic of the thread relates only to gas, kindly refrain from making up
> imaginary problems, thanks.

You're right, the compiler never seems to emit code that triggers this bug, 
you have to hand-write assembly to do it, and intentionally ask the assembler 
to do something it can't do.

> >   AS      arch/sh/kernel/cpu/sh4/../sh3/entry.o
> > arch/sh/kernel/cpu/sh4/../sh3/entry.S: Assembler messages:
> > arch/sh/kernel/cpu/sh4/../sh3/entry.S:261: Error: value of 4294967280 too
> > large for field of 2 bytes at 168
> > arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:60: Error: value of
> > 4294967280 too large for field of 2 bytes at 208
> > arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:172: Error: value of
> > 4294967280 too large for field of 2 bytes at 326
> > arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:320: Error: value of
> > 4294967280 too large for field of 2 bytes at 482
> >
> > Which is complaining in write.c (generic code).  (The patch doesn't seem
> > to adjust val, it just changes the error test...)
>
> It's a bug in gas on 64-bit hosts, which has subsequently been fixed
> upstream:
>
> 	http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/config/tc-sh.c.diff?r1=1.
>132&r2=1.133&cvsroot=src

The date on that commit is August 29.

So the official position of the maintainer of the Super Hitachi port is that any 
toolchain older than October 16th (the binutils 2.20 release) is too old to 
build the Linux kernel.  (With the corollary that in the 5 years since the PC 
went 64 bit, apparently nobody ever actually tried to build anything for Super 
Hitachi?)

Meanwhile Documentation/Changes still says binutils 2.12, and other 
architectures _never_ work around bugs in older toolchains (*cough* git 
2a4b9c5af8203 *cough*)...

*shrug*  I'm going to go locally revert the "cleanup" patch that asked the 
assembler to do something it can't do.  That fixes it for me.

Rob
-- 
Latency is more important than throughput. It's that simple. - Linus Torvalds


  parent reply	other threads:[~2010-01-29  7:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-27 13:28 Recent assembler sign extension patch Matt Fleming
2009-08-27 13:35 ` Paul Mundt
2009-08-27 14:39 ` Stuart MENEFY
2009-08-27 20:13 ` Matt Fleming
2009-09-14  5:12 ` Nobuhiro Iwamatsu
2009-09-14 13:26 ` Paul Mundt
2010-01-27  7:29 ` Rob Landley
2010-01-27  7:55 ` Paul Mundt
2010-01-29  7:53 ` Rob Landley [this message]
2010-01-29 15:23 ` Paul Mundt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201001290153.59940.rob@landley.net \
    --to=rob@landley.net \
    --cc=linux-sh@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).