mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 04:00:07 +08:00
(assemble_one_insn): tweak lexing of suffix
This commit is contained in:
@ -495,8 +495,8 @@ assemble_one_insn (cpu, opcode, operand_table, pstr, insn_buf)
|
|||||||
/* Pick the suffix out and parse it. */
|
/* Pick the suffix out and parse it. */
|
||||||
/* ??? Hmmm ... there may not be any need to nul-terminate the
|
/* ??? Hmmm ... there may not be any need to nul-terminate the
|
||||||
string, and it may in fact complicate things. */
|
string, and it may in fact complicate things. */
|
||||||
for (t = (*s == '.' || *s == '/') ? s + 1 : s;
|
for (t = (*s == '.' || *s == '/' || *s == '[') ? s + 1 : s;
|
||||||
*t && (isalnum (*t) || *t == '[' || *t == ']');
|
*t && (isalnum (*t) || *t == ']');
|
||||||
++t)
|
++t)
|
||||||
continue;
|
continue;
|
||||||
c = *t;
|
c = *t;
|
||||||
@ -520,6 +520,9 @@ assemble_one_insn (cpu, opcode, operand_table, pstr, insn_buf)
|
|||||||
else
|
else
|
||||||
*insn_buf |= suf_value << operand->shift;
|
*insn_buf |= suf_value << operand->shift;
|
||||||
|
|
||||||
|
/* FIXME: For suffixes that have a null "" value,
|
||||||
|
this next line is wrong as we will skip over something
|
||||||
|
we're not supposed to. */
|
||||||
str = t;
|
str = t;
|
||||||
++syn;
|
++syn;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user