public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Neal Frager <neal.frager@amd.com>
To: <binutils@sourceware.org>
Cc: <ibai.erkiaga-elorza@amd.com>, <nagaraju.mekala@amd.com>,
	<mark.hatle@amd.com>, <sadanand.mutyala@amd.com>,
	<appa.rao.nali@amd.com>, <vidhumouli.hunsigida@amd.com>,
	Neal Frager <neal.frager@amd.com>
Subject: [PATCH v1 1/1] gas: microblaze: fixing constant range check issue
Date: Tue, 26 Sep 2023 13:46:37 +0100	[thread overview]
Message-ID: <20230926124637.683385-1-neal.frager@amd.com> (raw)

The range check should be checking for the range
ffffffff80000000..7fffffff, not ffffffff70000000.

This patch has been tested for years of AMD Xilinx Yocto
releases as part of the following patch set:

https://github.com/Xilinx/meta-xilinx/tree/master/meta-microblaze/recipes-devtools/binutils/binutils

Signed-off-by: nagaraju <nagaraju.mekala@amd.com>
Signed-off-by: Neal Frager <neal.frager@amd.com>
---
 gas/config/tc-microblaze.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c
index 564e0b786e2..f205bb10b2b 100644
--- a/gas/config/tc-microblaze.c
+++ b/gas/config/tc-microblaze.c
@@ -755,7 +755,7 @@ parse_imm (char * s, expressionS * e, offsetT min, offsetT max)
       if ((e->X_add_number >> 31) == 1)
 	e->X_add_number |= -((addressT) (1U << 31));
 
-      if (e->X_add_number < min || e->X_add_number > max)
+      if ((int)e->X_add_number < min || (int)e->X_add_number > max)
 	{
 	  as_fatal (_("operand must be absolute in range %lx..%lx, not %lx"),
 		    (long) min, (long) max, (long) e->X_add_number);
-- 
2.25.1


             reply	other threads:[~2023-09-26 12:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-26 12:46 Neal Frager [this message]
2023-09-27 15:23 ` Nick Clifton
2023-09-29 15:48   ` Michael Eager

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=20230926124637.683385-1-neal.frager@amd.com \
    --to=neal.frager@amd.com \
    --cc=appa.rao.nali@amd.com \
    --cc=binutils@sourceware.org \
    --cc=ibai.erkiaga-elorza@amd.com \
    --cc=mark.hatle@amd.com \
    --cc=nagaraju.mekala@amd.com \
    --cc=sadanand.mutyala@amd.com \
    --cc=vidhumouli.hunsigida@amd.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).