+2020-09-15 Nick Clifton <nickc@redhat.com>
+
+ * read.c (s_nop): Preserve the input_line_pointer around the call
+ to md_assemble.
+ * config/tc-s12z.c (md_assemble): Revert previous delta.
+
2020-09-15 David Faust <david.faust@oracle.com>
* config/tc-bpf.h (md_single_noop_insn): Use 'ja 0' for no-op.
return;
}
- char * saved_ilp = input_line_pointer;
input_line_pointer = skip_whites (op_end);
size_t i;
if (0 == strcmp (name, opc->name))
{
if (opc->parse_operands (opc))
- {
- input_line_pointer = saved_ilp;
- return;
- }
+ return;
continue;
}
}
as_bad (_("Invalid instruction: \"%s\""), str);
as_bad (_("First invalid token: \"%s\""), fail_line_pointer);
- input_line_pointer = saved_ilp;
+ while (*input_line_pointer++)
+ ;
}
\f
if (asprintf (&nop, "%s", md_single_noop_insn) < 0)
as_fatal ("%s", xstrerror (errno));
+ /* Some targets assume that they can update input_line_pointer inside
+ md_assemble, and, worse, that they can leave it assigned to the string
+ pointer that was provided as an argument. So preserve ilp here. */
+ char * saved_ilp = input_line_pointer;
md_assemble (nop);
+ input_line_pointer = saved_ilp;
free (nop);
#endif
}