This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] Fix range check
- From: Momchil Velikov <velco at fadata dot bg>
- To: binutils at sources dot redhat dot com
- Date: 31 Jul 2002 11:39:20 +0300
- Subject: [PATCH] Fix range check
2002-07-31 Momchil Velikov <velco@fadata.bg>
* config/tc-v850.c (md_assemble): Fix range check for immediate
operand.
--- tc-v850.c.~1.21.~ Wed Jun 12 13:52:32 2002
+++ tc-v850.c Wed Jul 31 11:34:25 2002
@@ -1961,7 +1979,7 @@ md_assemble (str)
if (((insn & 0x07e0) == 0x0200)
&& ex.X_op == O_constant
&& (ex.X_add_number < (-(1 << (operand->bits - 1)))
- || ex.X_add_number > ((1 << operand->bits) - 1)))
+ || ex.X_add_number > ((1 << (operand->bits - 1)) - 1)))
errmsg = _("immediate operand is too large");
}