diff options
author | Alan Modra <amodra@gmail.com> | 2007-10-19 10:48:17 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2007-10-19 10:48:17 +0000 |
commit | 13abbae325704b1abd2a70d95a1dd8b97c0c269a (patch) | |
tree | b7775d8e09483a7e29f4584118c0e84f7b59a899 /gas | |
parent | cf01682b43f29253d134e28d537b3e7066f5f52f (diff) | |
download | gdb-13abbae325704b1abd2a70d95a1dd8b97c0c269a.zip gdb-13abbae325704b1abd2a70d95a1dd8b97c0c269a.tar.gz gdb-13abbae325704b1abd2a70d95a1dd8b97c0c269a.tar.bz2 |
* config/tc-ppc.c (ppc_parse_name): Skip leading '%'.
(md_assemble): When parsing PPC_OPERAND_CR, add '%' to set of
chars that can start a name.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-ppc.c | 10 |
2 files changed, 15 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 25e70db..5911282 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2007-10-19 Alan Modra <amodra@bigpond.net.au> + + * config/tc-ppc.c (ppc_parse_name): Skip leading '%'. + (md_assemble): When parsing PPC_OPERAND_CR, add '%' to set of + chars that can start a name. + 2007-10-18 Carlos O'Donell <carlos@systemhalted.org> * config/tc-hppa.c (pa_ip): Fix comment typo. diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index 713d25b..2a59847 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -684,6 +684,8 @@ ppc_parse_name (const char *name, expressionS *expr) if (! cr_operand) return 0; + if (*name == '%') + ++name; val = reg_name_search (cr_names, sizeof cr_names / sizeof cr_names[0], name); if (val < 0) @@ -2454,10 +2456,16 @@ md_assemble (char *str) { if (! register_name (&ex)) { + char save_lex = lex_type['%']; + if ((operand->flags & PPC_OPERAND_CR) != 0) - cr_operand = TRUE; + { + cr_operand = TRUE; + lex_type['%'] |= LEX_BEGIN_NAME; + } expression (&ex); cr_operand = FALSE; + lex_type['%'] = save_lex; } } |