re PR rtl-optimization/190 (Optimization bug for x86 target)
authorRichard Henderson <rth@redhat.com>
Tue, 2 Apr 2002 08:35:51 +0000 (00:35 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 2 Apr 2002 08:35:51 +0000 (00:35 -0800)
        PR opt/190
        * final.c (this_is_asm_operands): Export.
        * output.h (this_is_asm_operands): Declare.
        * config/i386/i386.c (print_operand): Error odd asm operands.

From-SVN: r51741

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/final.c
gcc/output.h

index c1eeba49bbd1457b9d8fe284f91ca417dc96895a..8fa21c4772449f1539a838e958340f03b32641dd 100644 (file)
@@ -1,3 +1,10 @@
+2002-04-02  Richard Henderson  <rth@redhat.com>
+
+       PR opt/190
+       * final.c (this_is_asm_operands): Export.
+       * output.h (this_is_asm_operands): Declare.
+       * config/i386/i386.c (print_operand): Error odd asm operands.
+
 2002-04-02  Richard Henderson  <rth@redhat.com>
 
        PR opt/420
index f36495eeae5906e2a544d57446c4eedbe49da3b0..adb8048b56ae768adf4ec9d6a7df273365a07710 100644 (file)
@@ -5995,6 +5995,8 @@ print_operand (file, x, code)
       else if (CONSTANT_ADDRESS_P (x) && code =='P'
               && GET_CODE (x) != CONST_INT)
        output_addr_const (file, x);
+      else if (this_is_asm_operands && ! address_operand (x, VOIDmode))
+       output_operand_lossage ("invalid constraints for operand");
       else
        output_address (x);
     }
index 47dd4555644dc1552c370424041e8bc3c1042b5e..4992cedaeb63ddb3e8aa139d41460b23a49cc362 100644 (file)
@@ -122,7 +122,7 @@ extern int length_unit_log; /* This is defined in insn-attrtab.c.  */
 /* Nonzero while outputting an `asm' with operands.
    This means that inconsistencies are the user's fault, so don't abort.
    The precise value is the insn being output, to pass to error_for_asm.  */
-static rtx this_is_asm_operands;
+rtx this_is_asm_operands;
 
 /* Number of operands of this insn, for an `asm' with operands.  */
 static unsigned int insn_noperands;
index 9c7adaff98c4b49c4f37c033a609fd4d430d77ab..3f8872a1c3b78a5ecea7aee13c74f5a2b51c5168 100644 (file)
@@ -465,6 +465,11 @@ extern struct rtx_def *current_insn_predicate;
 /* Last insn processed by final_scan_insn.  */
 extern struct rtx_def *current_output_insn;
 
+/* Nonzero while outputting an `asm' with operands.
+   This means that inconsistencies are the user's fault, so don't abort.
+   The precise value is the insn being output, to pass to error_for_asm.  */
+extern rtx this_is_asm_operands;
+
 /* Decide whether DECL needs to be in a writable section.  RELOC is the same
    as for SELECT_SECTION.  */