Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/gnu/dist/binutils/gas Pull across the fix for gas/991.
details: https://anonhg.NetBSD.org/src/rev/a7757b61e8ed
branches: trunk
changeset: 587741:a7757b61e8ed
user: skrll <skrll%NetBSD.org@localhost>
date: Thu Feb 02 22:19:18 2006 +0000
description:
Pull across the fix for gas/991.
All instructions are assembled correctly with this fix.
diffstat:
gnu/dist/binutils/gas/ChangeLog | 11 +++++++++++
gnu/dist/binutils/gas/config/tc-m68k.c | 22 ++++++++++++++++++++--
2 files changed, 31 insertions(+), 2 deletions(-)
diffs (79 lines):
diff -r f3613f928ac0 -r a7757b61e8ed gnu/dist/binutils/gas/ChangeLog
--- a/gnu/dist/binutils/gas/ChangeLog Thu Feb 02 22:14:43 2006 +0000
+++ b/gnu/dist/binutils/gas/ChangeLog Thu Feb 02 22:19:18 2006 +0000
@@ -1,4 +1,15 @@
+2005-06-08 Tomas Hurka <tom%hukatronic.cz@localhost>
+
+ PR991
+ * config/tc-m68k.c (m68k_ip): Test for insn compatiblity using a
+ temporary copy of the operands array so that changes can be safely
+ backed out if the insn does not match.
+ (m68k_compare_opcode): Shortcut the test when the parameters are
+ the same. Return 1 if the names match but the second opcode is
+ further on in the array than the first.
+
2005-06-12 Daniel Jacobowitz <dan%codesourcery.com@localhost>
+ PR 994
Backport from mainline:
2005-06-01 Maciej W. Rozycki <macro%linux-mips.org@localhost>
diff -r f3613f928ac0 -r a7757b61e8ed gnu/dist/binutils/gas/config/tc-m68k.c
--- a/gnu/dist/binutils/gas/config/tc-m68k.c Thu Feb 02 22:14:43 2006 +0000
+++ b/gnu/dist/binutils/gas/config/tc-m68k.c Thu Feb 02 22:19:18 2006 +0000
@@ -1089,6 +1089,7 @@
char c;
int losing;
int opsfound;
+ struct m68k_op operands_backup[6];
LITTLENUM_TYPE words[6];
LITTLENUM_TYPE *wordp;
unsigned long ok_arch = 0;
@@ -1213,7 +1214,15 @@
++losing;
else
{
- for (s = opcode->m_operands, opP = &the_ins.operands[0];
+ int i;
+
+ /* Make a copy of the operands of this insn so that
+ we can modify them safely, should we want to. */
+ assert (opsfound <= (int) ARRAY_SIZE (operands_backup));
+ for (i = 0; i < opsfound; i++)
+ operands_backup[i] = the_ins.operands[i];
+
+ for (s = opcode->m_operands, opP = &operands_backup[0];
*s && !losing;
s += 2, opP++)
{
@@ -1974,6 +1983,12 @@
if (losing)
break;
}
+
+ /* Since we have found the correct instruction, copy
+ in the modifications that we may have made. */
+ if (!losing)
+ for (i = 0; i < opsfound; i++)
+ the_ins.operands[i] = operands_backup[i];
}
if (!losing)
@@ -4116,6 +4131,9 @@
struct m68k_opcode * op1, * op2;
int ret;
+ if (v1 == v2)
+ return 0;
+
op1 = *(struct m68k_opcode **) v1;
op2 = *(struct m68k_opcode **) v2;
@@ -4126,7 +4144,7 @@
return ret;
if (op1 < op2)
return -1;
- return 0;
+ return 1;
}
void
Home |
Main Index |
Thread Index |
Old Index