*** empty log message ***
authorRichard Kenner <kenner@gcc.gnu.org>
Sun, 12 Apr 1992 21:11:03 +0000 (17:11 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Sun, 12 Apr 1992 21:11:03 +0000 (17:11 -0400)
From-SVN: r730

gcc/Makefile.in
gcc/config/rs6000/rs6000.c
gcc/stmt.c
gcc/varasm.c

index b7e76bbfa8fd9f5fe88d439ad354578c314951d0..ae08a33d51c15e4dd9a8f4dffb2b9b7b3834887a 100644 (file)
@@ -813,7 +813,7 @@ recog.o : recog.c $(CONFIG_H) $(RTL_H)  \
    insn-flags.h insn-codes.h real.h
 reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
    regs.h hard-reg-set.h flags.h insn-config.h
-   
+
 aux-output.o : aux-output.c $(CONFIG_H) \
    $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
    insn-flags.h output.h insn-attr.h insn-codes.h
@@ -1153,6 +1153,7 @@ mostlyclean:
        for name in $(LIB1FUNCS); do rm -f $${name}.c; done
 # Delete other temporary files.
        -rm -f tmp-float.h tmp-*proto.1 tmp-gcc.xtar.Z tmp-limits.h gccnew
+       -rm -f tmp-foo1 tmp-foo2
 # Delete the stamp files.
        -rm -f stamp-* tmp-*
 # Delete debugging dump files.
@@ -1550,6 +1551,26 @@ bootstrap2: force
 bootstrap3: force
        $(MAKE) CC="stage2/gcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
 
+# Compare the object files in the current directory with those in the
+# stage2 directory.
+
+compare: force
+       for file in *.o; do \
+         tail +10c $file > tmp-foo1; \
+         tail +10c stage2/$file > tmp-foo2; \
+         cmp tmp-foo1 tmp-foo2 || echo $file differs; \
+       done
+       -rm -f tmp-foo*
+
+# Similar, but compare with stage3 directory
+compare3: force
+       for file in *.o; do \
+         tail +10c $file > tmp-foo1; \
+         tail +10c stage3/$file > tmp-foo2; \
+         cmp tmp-foo1 tmp-foo2 || echo $file differs; \
+       done
+       -rm -f tmp-foo*
+
 # Copy the object files from a particular stage into a subdirectory.
 stage1: force
        -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
index 3d8712e2a92e69de07f24e9e26859360db83941f..e190d807e3a82220e931f6054acf9447c7370ffb 100644 (file)
@@ -98,6 +98,17 @@ u_short_cint_operand (op, mode)
   return (GET_CODE (op) == CONST_INT && (INTVAL (op) & 0xffff0000) == 0);
 }
 
+/* Return 1 if OP is a CONST_INT that cannot fit in a signed D field.  */
+
+int
+non_short_cint_operand (op, mode)
+     register rtx op;
+     enum machine_mode mode;
+{
+  return (GET_CODE (op) == CONST_INT
+         && (unsigned) (INTVAL (op) + 0x8000) >= 0x10000);
+}
+
 /* Returns 1 if OP is a register that is not special (i.e., not MQ,
    ctr, or lr).  */
 
@@ -248,6 +259,18 @@ add_operand (op, mode)
          || (GET_CODE (op) == CONST_INT && (INTVAL (op) & 0xffff) == 0));
 }
 
+/* Return 1 if OP is a constant but not a valid add_operand.  */
+
+int
+non_add_cint_operand (op, mode)
+     register rtx op;
+     enum machine_mode mode;
+{
+  return (GET_CODE (op) == CONST_INT
+         && (unsigned) (INTVAL (op) + 0x8000) >= 0x10000
+         && (INTVAL (op) & 0xffff) != 0);
+}
+
 /* Return 1 if the operand is a non-special register or a constant that
    can be used as the operand of an OR or XOR insn on the RS/6000.  */
 
@@ -262,6 +285,19 @@ logical_operand (op, mode)
                  || (INTVAL (op) & 0xffff) == 0)));
 }
 
+/* Return 1 if C is a constant that is not a logical operand (as
+   above).  */
+
+int
+non_logical_cint_operand (op, mode)
+     register rtx op;
+     enum machine_mode mode;
+{
+  return (GET_CODE (op) == CONST_INT
+         && (INTVAL (op) & 0xffff0000) != 0
+         && (INTVAL (op) & 0xffff) != 0);
+}
+
 /* Return 1 if C is a constant that can be encoded in a mask on the
    RS/6000.  It is if there are no more than two 1->0 or 0->1 transitions.
    Reject all ones and all zeros, since these should have been optimized
@@ -310,6 +346,17 @@ and_operand (op, mode)
          || mask_operand (op, mode));
 }
 
+/* Return 1 if the operand is a constant but not a valid operand for an AND
+   insn.  */
+
+int
+non_and_cint_operand (op, mode)
+     register rtx op;
+     enum machine_mode mode;
+{
+  return GET_CODE (op) == CONST_INT && ! and_operand (op, mode);
+}
+
 /* Return 1 if the operand is a general register or memory operand.  */
 
 int
index a999cb4f40201062acc201fd889bcf03fa283f02..1c531648584944087c6b90a61cdf81d86abd5e3b 100644 (file)
@@ -1155,6 +1155,9 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
 
          if (j < 0)
            {
+             if (j == -3)
+               continue;
+
              error ("unknown register name `%s' in `asm'", regname);
              return;
            }
index ab3591d25c91b41504e20a0c34ed9ea37cfcb526..a2f7e8f8f5679a87956304092264839f5026ce77 100644 (file)
@@ -208,11 +208,13 @@ strip_reg_name (name)
     name++;
   return name;
 }
-
+\f
 /* Decode an `asm' spec for a declaration as a register name.
    Return the register number, or -1 if nothing specified,
-   or -2 if the name is not a register.  Accept an exact spelling or
-   a decimal number.  Prefixes such as % are optional.  */
+   or -2 if the ASMSPEC is not `cc' and is recognized,
+   or -3 if ASMSPEC is `cc' and is not recognized.
+   Accept an exact spelling or a decimal number.
+   Prefixes such as % are optional.  */
 
 int
 decode_reg_name (asmspec)
@@ -254,6 +256,9 @@ decode_reg_name (asmspec)
       }
 #endif /* ADDITIONAL_REGISTER_NAMES */
 
+      if (!strcmp (asmspec, "cc"))
+       return -3;
+
       return -2;
     }
 
@@ -302,10 +307,10 @@ make_decl_rtl (decl, asmspec, top_level)
       if (TREE_REGDECL (decl) && reg_number == -1)
        error_with_decl (decl,
                         "register name not specified for `%s'");
-      else if (TREE_REGDECL (decl) && reg_number == -2)
+      else if (TREE_REGDECL (decl) && reg_number < 0)
        error_with_decl (decl,
                         "invalid register name for `%s'");
-      else if (reg_number >= 0 && ! TREE_REGDECL (decl))
+      else if ((reg_number >= 0 || reg_number == -3) && ! TREE_REGDECL (decl))
        error_with_decl (decl,
                         "register name given for non-register variable `%s'");
       else if (TREE_REGDECL (decl) && TREE_CODE (decl) == FUNCTION_DECL)