]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* config/tc-v850.c (md_assemble): If we find a register, but the
authorJeff Law <law@redhat.com>
Fri, 23 Aug 1996 16:43:23 +0000 (16:43 +0000)
committerJeff Law <law@redhat.com>
Fri, 23 Aug 1996 16:43:23 +0000 (16:43 +0000)
        opcode doesn't want a register, then we don't have a match.
        (md_assemble): Get size of the instruction from the opcode table.
So we choose the right opcode and so that we get the sizes right.

gas/ChangeLog
gas/config/tc-v850.c

index 9007a52d84defc6a8d2a4176f12645a14e3876d9..151bf2f06a5a46e63aef1cec4af14ef1aa0d24af 100644 (file)
@@ -1,3 +1,11 @@
+start-sanitize-v850
+Fri Aug 23 10:41:32 1996  Jeffrey A Law  (law@cygnus.com)
+
+       * config/tc-v850.c (md_assemble): If we find a register, but the
+       opcode doesn't want a register, then we don't have a match.
+       (md_assemble): Get size of the instruction from the opcode table.
+
+end-sanitize-v850
 Thu Aug 22 10:20:30 1996  Ian Lance Taylor  <ian@cygnus.com>
 
        * configure.in: Set and substitute HLDENV.
index ac47152fa6a3c40b92e12c1db1b53366b7aa128d..adc17e756bf208daa36d0304275edb8e854108b5 100644 (file)
@@ -500,6 +500,12 @@ md_assemble (str)
                  fc++;
                }
            }
+         else if (register_name (&ex)
+                  && (operand->flags & V850_OPERAND_REG) == 0)
+           {
+             errmsg = "syntax error: register not expected";
+             goto error;
+           }
          else
            {
                expression(&ex);
@@ -572,17 +578,8 @@ md_assemble (str)
 
   input_line_pointer = str;
 
-  /* Write out the instruction.  */
-  if ((insn & 0x0600) == 0x0600)
-    {
-      f = frag_more (4);
-      md_number_to_chars (f, insn, 4);
-    }
-  else
-    {
-      f = frag_more (2);
-      md_number_to_chars (f, insn, 2);
-    }
+  f = frag_more (opcode->size);
+  md_number_to_chars (f, insn, opcode->size);
 }