From: Paul Mundt <lethal@linux-sh.org>
To: linux-sh@vger.kernel.org
Subject: Re: Recent assembler sign extension patch
Date: Thu, 27 Aug 2009 13:35:42 +0000 [thread overview]
Message-ID: <20090827133542.GA5097@linux-sh.org> (raw)
In-Reply-To: <20090827132813.GB4668@console-pimps.org>
On Thu, Aug 27, 2009 at 02:28:13PM +0100, Matt Fleming wrote:
> Hey Stuart,
>
> Your recent patch "sh: Remove implicit sign extension from assembler
> immediates" (fea966f7564205fcf5919af9bde031e753419c96 in Paul's tree)
> causes gas to error out for me. I'm using today's version of the
> binutils assembler, GNU assembler version 2.19.51 (sh4-linux) using BFD
> version (GNU Binutils) 2.19.51.20090827.
>
> arch/sh/kernel/cpu/sh4/../sh3/entry.S:260: Error: offset out of range
> arch/sh/kernel/cpu/sh4/../sh3/entry.S:260: Error: value of 4294967280 too large for field of 2 bytes at 160
> arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:60: Error: offset out of range
> arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:60: Error: value of 4294967280 too large for field of 2 bytes at 248
> arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:172: Error: offset out of range
> arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:172: Error: value of 4294967280 too large for field of 2 bytes at 516
> arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:320: Error: offset out of range
> arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:320: Error: value of 4294967280 too large for field of 2 bytes at 820
> make[3]: *** [arch/sh/kernel/cpu/sh4/../sh3/entry.o] Error 1
> make[2]: *** [arch/sh/kernel/cpu/sh4] Error 2
> make[1]: *** [arch/sh/kernel/cpu] Error 2
> make: *** [arch/sh/kernel] Error 2
>
> I can't really understand the motivation for the change, specifically
> the changelog for the patch states that the assembler was getting the
> sign extension wrong in one case, but I can't see where. All the uses of
> the "mov" and "and" instructions look sane to me. Could you explain the
> issues you were seeing in a bit more detail, please?
>
> I could be missing something blatantly obvious, however ;-)
Incidentally, this produces the proper results with the version of
binutils I am using, so it seems there are two separate issues, and that
the sign extension issue in question is likely already fixed by more
recent binutils versions.
It looks like we will have to version it and bury the sign extension in a
macro to deal with the different binutils versions. Your version of
binutils looks like it is doing the right thing, but I am concerned about
the other versions that require the explicit sign extension.
next prev parent reply other threads:[~2009-08-27 13:35 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 [this message]
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
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=20090827133542.GA5097@linux-sh.org \
--to=lethal@linux-sh.org \
--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).