* config/tc-ppc.c (md_assemble): If -mregnames, when parsing
authorAlan Modra <amodra@gmail.com>
Mon, 12 Nov 2007 00:27:53 +0000 (00:27 +0000)
committerAlan Modra <amodra@gmail.com>
Mon, 12 Nov 2007 00:27:53 +0000 (00:27 +0000)
PPC_OPERAND_CR always parse as expression to allow register name
followed by an expression.

gas/ChangeLog
gas/config/tc-ppc.c

index a54f9c73fd75031913aa35cba6831c22cc48a452..4a133ab5fd1620865c0ac976b8355a79f8154354 100644 (file)
@@ -1,3 +1,9 @@
+2007-11-12  Tristan Gingold  <gingold@adacore.com>
+
+       * config/tc-ppc.c (md_assemble): If -mregnames, when parsing
+       PPC_OPERAND_CR always parse as expression to allow register name
+       followed by an expression.
+
 2007-11-09  H.J. Lu  <hongjiu.lu@intel.com>
 
        * config/tc-i386.c (match_template): Re-order suffix check.
index 1679c7ecb166a60ff72aa371775d0cb944e1caf7..a4c83d9033f9367f6cf97949f4ad1a681a64d0b7 100644 (file)
@@ -2454,7 +2454,8 @@ md_assemble (char *str)
       else
 #endif         /* TE_PE */
        {
-         if (! register_name (&ex))
+         if ((reg_names_p && (operand->flags & PPC_OPERAND_CR) != 0)
+             || !register_name (&ex))
            {
              char save_lex = lex_type['%'];