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]

another z8k gas fix


Hi,

the assembler didn't flag some invalid constructs (like "ldb
@@rr2,rl0", note the double "@@") as an error. The attached patch
fixes this. Applied.

regards,
chris


gas/ChangeLog:

2005-01-28  Christian Groessler  <chris@groessler.org>

        * config/tc-z8k.c (md_assemble): Improve error detection.



Index: config/tc-z8k.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-z8k.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- config/tc-z8k.c     27 Jan 2005 21:32:21 -0000      1.31
+++ config/tc-z8k.c     28 Jan 2005 19:33:26 -0000      1.32
@@ -1241,11 +1241,12 @@
 
       new_input_line_pointer = get_operands (opcode, op_end, operand);
       if (new_input_line_pointer)
-        input_line_pointer = new_input_line_pointer;
-
-      opcode = get_specific (opcode, operand);
+        {
+          input_line_pointer = new_input_line_pointer;
+          opcode = get_specific (opcode, operand);
+        }
 
-      if (opcode == 0)
+      if (new_input_line_pointer == NULL || opcode == NULL)
        {
          /* Couldn't find an opcode which matched the operands.  */
          char *where = frag_more (2);


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