From 2677a57064afd32076b85295bdc11de6e75e7e36 Mon Sep 17 00:00:00 2001 From: Neal Frager Date: Fri, 29 Sep 2023 08:45:46 -0700 Subject: [PATCH] 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 Signed-off-by: Neal Frager Signed-off-by: Michael J. Eager --- 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); -- 2.30.2