aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorCraig Rodrigues <rodrigc@gcc.gnu.org>2001-11-29 21:39:41 +0000
committerCraig Rodrigues <rodrigc@gcc.gnu.org>2001-11-29 21:39:41 +0000
commitc1d5afc412f820af3a04c5d3c9ddf53d160752ec (patch)
tree0eefc5a66f9adae287745db20e60e8011edc2ce6 /gcc
parent894c7af33d49598598ac8b82a6104ea25e18957a (diff)
downloadgcc-c1d5afc412f820af3a04c5d3c9ddf53d160752ec.zip
gcc-c1d5afc412f820af3a04c5d3c9ddf53d160752ec.tar.gz
gcc-c1d5afc412f820af3a04c5d3c9ddf53d160752ec.tar.bz2
re PR other/4932 (the i386 backend crashes on incorrect asm("... %c0 ..."))
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/i386/i386.c7
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8a97e84..3e2e923 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 46ef9f0..b522035 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -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':