This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[Xtensa] off-by-one error check in gas
- From: Bob Wilson <bwilson at tensilica dot com>
- To: binutils at sources dot redhat dot com
- Date: Fri, 12 Sep 2008 11:56:50 -0700
- Subject: [Xtensa] off-by-one error check in gas
I've committed this patch from Sterling Augustine to fix an error check in gas.
The check was not allowing an instruction with MAX_INSN_ARGS operands, which
should be OK.
gas/ChangeLog
2008-09-12 Sterling Augustine <sterling@tensilica.com>
* config/tc-xtensa.c (init_op_placement_info_table): Allow number of
operands equal to MAX_INSN_ARGS.
Index: config/tc-xtensa.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-xtensa.c,v
retrieving revision 1.103
diff -u -p -r1.103 tc-xtensa.c
--- config/tc-xtensa.c 20 Aug 2008 23:28:58 -0000 1.103
+++ config/tc-xtensa.c 12 Sep 2008 18:46:19 -0000
@@ -11058,7 +11058,7 @@ init_op_placement_info_table (void)
{
op_placement_info *opi = &op_placement_table[opcode];
/* FIXME: Make tinsn allocation dynamic. */
- if (xtensa_opcode_num_operands (isa, opcode) >= MAX_INSN_ARGS)
+ if (xtensa_opcode_num_operands (isa, opcode) > MAX_INSN_ARGS)
as_fatal (_("too many operands in instruction"));
opi->narrowest = XTENSA_UNDEFINED;
opi->narrowest_size = 0x7F;