From: Alan Modra <amodra@gmail.com>
To: Nick Clifton <nickc@redhat.com>
Cc: binutils@sourceware.org
Subject: Re: PATCH: COMMITTED: Fix typos in tc-cr16.c
Date: Mon, 11 Apr 2011 04:53:00 -0000 [thread overview]
Message-ID: <20110411045307.GB710@bubble.grove.modra.org> (raw)
In-Reply-To: <m3bp64f30q.fsf@redhat.com>
On Fri, Nov 05, 2010 at 11:01:09AM +0000, Nick Clifton wrote:
> 2010-11-05 Nick Clifton <nickc@redhat.com>
>
> * config/tc-cr16.c (getprocreg_image): Fix typo MAX_PREG ->
> MAX_REG.
> (getprocregp_image): Likewise.
Nick,
I've been going over testsuite results, and this change causes a gas
testsuite failure. I believe we should have the following instead.
Applied mainline and 2.21.
* config/tc-cr16.c (getprocreg_image): Correct range check.
(getprocregp_image): Likewise.
Index: gas/config/tc-cr16.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-cr16.c,v
retrieving revision 1.11
diff -u -p -r1.11 tc-cr16.c
--- gas/config/tc-cr16.c 5 Nov 2010 11:08:27 -0000 1.11
+++ gas/config/tc-cr16.c 11 Apr 2011 04:46:20 -0000
@@ -1,5 +1,6 @@
/* tc-cr16.c -- Assembler code for the CR16 CPU core.
- Copyright 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright 2007, 2008, 2009, 2010, 2011
+ Free Software Foundation, Inc.
Contributed by M R Swami Reddy <MR.Swami.Reddy@nsc.com>
@@ -1669,7 +1670,7 @@ getprocreg_image (reg r)
char *reg_name;
/* Check whether the register is in registers table. */
- if (r < MAX_REG)
+ if (r >= MAX_REG && r < MAX_PREG)
rreg = &cr16_pregtab[r - MAX_REG];
/* Register not found. */
else
@@ -1708,7 +1709,7 @@ getprocregp_image (reg r)
int pregptab_disp = 0;
/* Check whether the register is in registers table. */
- if (r < MAX_REG)
+ if (r >= MAX_REG && r < MAX_PREG)
{
r = r - MAX_REG;
switch (r)
--
Alan Modra
Australia Development Lab, IBM
next prev parent reply other threads:[~2011-04-11 4:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-05 11:01 Nick Clifton
2011-04-11 4:53 ` Alan Modra [this message]
2011-04-11 9:03 ` Nick Clifton
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=20110411045307.GB710@bubble.grove.modra.org \
--to=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=nickc@redhat.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).