This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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");
 		}
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]