aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-ppc.c10
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;
}
}