public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] tc-microblaze.c - int compare for X_add_number.
@ 2023-09-29 15:47 Michael Eager
  0 siblings, 0 replies; only message in thread
From: Michael Eager @ 2023-09-29 15:47 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2677a57064afd32076b85295bdc11de6e75e7e36

commit 2677a57064afd32076b85295bdc11de6e75e7e36
Author: Neal Frager <neal.frager@amd.com>
Date:   Fri Sep 29 08:45:46 2023 -0700

    tc-microblaze.c - int compare for X_add_number.
    
    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>
    Signed-off-by: Michael J. Eager <eager@eagercon.com>

Diff:
---
 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 aa85174befd..d900a9e1d05 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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-29 15:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-29 15:47 [binutils-gdb] tc-microblaze.c - int compare for X_add_number Michael Eager

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).