* config/tc-mn10300.h (md_assemble): Tweak further so

that all instructions are parsed correctly.
This commit is contained in:
Jeff Law 1996-10-08 20:59:28 +00:00
parent 1d57416709
commit a6be605a1a
2 changed files with 24 additions and 19 deletions

View file

@ -1,3 +1,8 @@
Tue Oct 8 14:56:15 1996 Jeffrey A Law (law@cygnus.com)
* config/tc-mn10300.h (md_assemble): Tweak further so
that all instructions are parsed correctly.
Tue Oct 8 13:02:21 1996 Ian Lance Taylor <ian@cygnus.com>
* as.h: Include libiberty.h.

View file

@ -434,7 +434,6 @@ md_assemble (str)
{
const char *errmsg = NULL;
int op_idx;
int parens = 0;
char *hold;
fc = 0;
@ -467,16 +466,19 @@ md_assemble (str)
hold = input_line_pointer;
input_line_pointer = str;
#if 1
if (*str == '(')
{
str++;
if (operand->flags & MN10300_OPERAND_PAREN)
{
if (*input_line_pointer != ')' && *input_line_pointer != '(')
{
input_line_pointer = hold;
str = hold;
goto error;
}
input_line_pointer++;
parens++;
goto keep_going;
}
#endif
/* See if we can match the operands. */
if (operand->flags & MN10300_OPERAND_DREG)
else if (operand->flags & MN10300_OPERAND_DREG)
{
if (!data_register_name (&ex))
{
@ -557,6 +559,12 @@ md_assemble (str)
str = hold;
goto error;
}
else if (*str == ')' || *str == '(')
{
input_line_pointer = hold;
str = hold;
goto error;
}
else
{
expression (&ex);
@ -626,19 +634,11 @@ keep_going:
while (*str == ' ' || *str == ',' || *str == '[' || *str == ']')
++str;
if (*str == ')')
{
str++;
parens--;
}
}
if (parens == 0 && *str != ',')
/* Make sure we used all the operands! */
if (*str != ',')
match = 1;
else
{
input_line_pointer = hold;
str = hold;
}
error:
if (match == 0)