aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2007-10-19 10:48:17 +0000
committerAlan Modra <amodra@gmail.com>2007-10-19 10:48:17 +0000
commit13abbae325704b1abd2a70d95a1dd8b97c0c269a (patch)
treeb7775d8e09483a7e29f4584118c0e84f7b59a899 /gas/config
parentcf01682b43f29253d134e28d537b3e7066f5f52f (diff)
downloadgdb-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/config')
-rw-r--r--gas/config/tc-ppc.c10
1 files changed, 9 insertions, 1 deletions
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;
}
}