re PR other/4932 (the i386 backend crashes on incorrect asm("... %c0 ..."))
authorCraig Rodrigues <rodrigc@gcc.gnu.org>
Thu, 29 Nov 2001 21:39:41 +0000 (21:39 +0000)
committerCraig Rodrigues <rodrigc@gcc.gnu.org>
Thu, 29 Nov 2001 21:39:41 +0000 (21:39 +0000)
2001-11-29  Craig Rodrigues  <rodrigc@gcc.gnu.org>

        PR other/4932
        * config/i386/i386.c (print_operand):  Verify that the
          argument to %c is a constant and not a conditional which
          needs to be reversed.

From-SVN: r47453

gcc/ChangeLog
gcc/config/i386/i386.c

index 8a97e84ac1e23c05cb3e1e33c27416f22c9d6b0c..3e2e923582f99905d29f5343b69a9763508859f2 100644 (file)
@@ -1,3 +1,10 @@
+2001-11-29  Craig Rodrigues  <rodrigc@gcc.gnu.org>
+
+       PR other/4932
+       * config/i386/i386.c (print_operand):  Verify that the
+         argument to %c is a constant and not a conditional which
+         needs to be reversed.
+
 Thu Nov 29 11:12:59 2001  Geoffrey Keating (geoffk@redhat.com)
 
         * emit-rtl.c (gen_lowpart_common): Fix conversion of 
index 46ef9f0afb76866ca28464ff120131d02d7e6233..b52203553af37810be0ba7a0258cf1dc42de54e9 100644 (file)
@@ -5650,6 +5650,13 @@ print_operand (file, x, code)
 
          /* Like above, but reverse condition */
        case 'c':
+         /* Check to see if argument to %c is really a constant 
+            and not a condition code which needs to be reversed.  */
+         if (GET_RTX_CLASS (GET_CODE (x)) != '<')
+         {
+           output_operand_lossage ("operand is neither a constant nor a condition code, invalid operand code 'c'");
+            return;
+         }
          put_condition_code (GET_CODE (x), GET_MODE (XEXP (x, 0)), 1, 0, file);
          return;
        case 'f':