Allow FAKE arguments to have a parser handler.
authorDoug Evans <dje@google.com>
Thu, 19 Feb 1998 00:39:38 +0000 (00:39 +0000)
committerDoug Evans <dje@google.com>
Thu, 19 Feb 1998 00:39:38 +0000 (00:39 +0000)
gas/config/tc-dvp.c

index e7cfc69298acd7c8760dc1ea5c3932c05f25f7a2..38580ffb7dd85e159a75156ebcd4148602385d7c 100644 (file)
@@ -607,11 +607,20 @@ assemble_one_insn (cpu, opcode, operand_table, pstr, insn_buf)
 
          if (operand->flags & DVP_OPERAND_FAKE)
            {
+             long value = 0;
+             if (operand->parse)
+               {
+                 errmsg = NULL;
+                 value = (*operand->parse) (opcode, operand, mods,
+                                            &str, &errmsg);
+                 if (errmsg)
+                   break;
+               }
              if (operand->insert)
                {
                  errmsg = NULL;
-                 (*operand->insert) (opcode, operand, mods, insn_buf, 0,
-                                     &errmsg);
+                 (*operand->insert) (opcode, operand, mods, insn_buf,
+                                     (offsetT) value, &errmsg);
                  /* If we get an error, go on to try the next insn.  */
                  if (errmsg)
                    break;