From c1d5afc412f820af3a04c5d3c9ddf53d160752ec Mon Sep 17 00:00:00 2001 From: Craig Rodrigues Date: Thu, 29 Nov 2001 21:39:41 +0000 Subject: [PATCH] re PR other/4932 (the i386 backend crashes on incorrect asm("... %c0 ...")) 2001-11-29 Craig Rodrigues 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 | 7 +++++++ gcc/config/i386/i386.c | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8a97e84ac1e..3e2e923582f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2001-11-29 Craig Rodrigues + + 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 46ef9f0afb7..b52203553af 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': -- 2.30.2