This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Commit: RX: Fix gas testsuite failures
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sourceware dot org
- Date: Wed, 19 Mar 2014 09:42:22 +0000
- Subject: Commit: RX: Fix gas testsuite failures
- Authentication-results: sourceware.org; auth=none
Hi Guys,
I am applying the patch below to fix a failure in the GAS testsuite
for the RX target. The problem was that when disassembling some data
as if it were instructions, the disassembler could seg-fault because
it was reading beyond the end of an array.
Cheers
Nick
opcodes/ChangeLog
2014-03-19 Nick Clifton <nickc@redhat.com>
* rx-decode.opc (bwl): Allow for bogus instructions with a size
field of 3.
(sbwl, ubwl, SCALE): Likewise.
* rx-decode.c: Regenerate.
diff --git a/opcodes/rx-decode.opc b/opcodes/rx-decode.opc
index 8bf1f94..46b8aea 100644
--- a/opcodes/rx-decode.opc
+++ b/opcodes/rx-decode.opc
@@ -48,21 +48,24 @@ static int bwl[] =
{
RX_Byte,
RX_Word,
- RX_Long
+ RX_Long,
+ 0 /* Bogus instructions can have a size field set to 3. */
};
static int sbwl[] =
{
RX_SByte,
RX_SWord,
- RX_Long
+ RX_Long,
+ 0 /* Bogus instructions can have a size field set to 3. */
};
static int ubwl[] =
{
RX_UByte,
RX_UWord,
- RX_Long
+ RX_Long,
+ 0 /* Bogus instructions can have a size field set to 3. */
};
static int memex[] =
@@ -81,7 +84,7 @@ static int memex[] =
rx->op[n].size = s )
/* This is for the BWL and BW bitfields. */
-static int SCALE[] = { 1, 2, 4 };
+static int SCALE[] = { 1, 2, 4, 0 };
/* This is for the prefix size enum. */
static int PSCALE[] = { 4, 1, 1, 1, 2, 2, 2, 3, 4 };