[binutils-gdb] tc-microblaze.c - int compare for X_add_number.
Michael Eager
eager@sourceware.org
Fri Sep 29 15:47:36 GMT 2023
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);
More information about the Binutils-cvs
mailing list