]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
emit-rtl.c (gen_lowpart_common): Suppress last change if __complex__.
authorJeffrey A Law <law@cygnus.com>
Thu, 19 Feb 1998 00:33:40 +0000 (00:33 +0000)
committerJeff Law <law@gcc.gnu.org>
Thu, 19 Feb 1998 00:33:40 +0000 (17:33 -0700)
        * emit-rtl.c (gen_lowpart_common): Suppress last change if __complex__.
        * emit-rtl.c (hard-reg-set.h): Include.
        (get_lowpart_common): Don't make new REG for hard reg in a
        class that cannot change size.
        * Makefile.in (emit-rtl.o): Depend on hard-reg-set.h.
        * combine.c: Revert previous patch.

Co-Authored-By: Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
From-SVN: r18108

gcc/ChangeLog
gcc/Makefile.in
gcc/combine.c
gcc/emit-rtl.c

index 06517bcff9a17df2ee0450fdde621a3f1eaa4f00..bfba96580742c8ffa64834b9df433eadad9fe7e9 100644 (file)
@@ -1,3 +1,15 @@
+Thu Feb 19 01:32:37 1998  Jeffrey A Law  (law@cygnus.com)
+                         Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+
+       * emit-rtl.c (gen_lowpart_common): Suppress last change if __complex__.
+
+       * emit-rtl.c (hard-reg-set.h): Include.
+       (get_lowpart_common): Don't make new REG for hard reg in a 
+       class that cannot change size.
+       * Makefile.in (emit-rtl.o): Depend on hard-reg-set.h.
+
+       * combine.c: Revert previous patch.
+
 Tue Feb 17 23:34:29 1998 David Edelsohn  <edelsohn@mhpcc.edu>
 
        * rs6000.h (MY_ISCOFF): Add numeric value of U803XTOCMAGIC.
index f15748f8e1cac9dd5c617831afcf26efecb4dd09..e85ed555b0c32bd851b94396c51103e68d21e5ba 100644 (file)
@@ -1304,7 +1304,8 @@ dwarf2out.o : dwarf2out.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf2.h flags.h \
 xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h
 emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
    function.h regs.h insn-config.h insn-codes.h real.h expr.h bytecode.h \
-   bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h bc-emit.h bc-opname.h
+   bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h bc-emit.h bc-opname.h \
+   hard-reg-set.h
 real.o : real.c $(CONFIG_H) $(TREE_H)
 getpwd.o : getpwd.c $(CONFIG_H)
 
index bc37d61c7a2f96994696727fbec95ccfd9bdd370..2fd6246e2ef394a90515b66b0491aa69d828b746 100644 (file)
@@ -3367,13 +3367,6 @@ simplify_rtx (x, op0_mode, last, in_dest)
 
       if (GET_CODE (SUBREG_REG (x)) == REG
          && REGNO (SUBREG_REG (x)) < FIRST_PSEUDO_REGISTER
-#ifdef CLASS_CANNOT_CHANGE_SIZE
-         && (! (TEST_HARD_REG_BIT
-                (reg_class_contents[(int) CLASS_CANNOT_CHANGE_SIZE],
-                 REGNO (SUBREG_REG (x))))
-             || (GET_MODE_SIZE (mode)
-                 == GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))))
-#endif
          && REGNO (SUBREG_REG (x)) != FRAME_POINTER_REGNUM
 #if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM
          && REGNO (SUBREG_REG (x)) != HARD_FRAME_POINTER_REGNUM
@@ -4986,20 +4979,6 @@ expand_compound_operation (x)
   int modewidth;
   rtx tem;
 
-#ifdef CLASS_CANNOT_CHANGE_SIZE
-  /* When dealing with hard regs that cannot change size, don't even try
-     expanding to shifts, since we wind up violating the rule.  */
-  if (GET_RTX_CLASS (GET_CODE (x)) == '1'
-      && GET_CODE (XEXP (x, 0)) == REG
-      && REGNO (SUBREG_REG (x)) < FIRST_PSEUDO_REGISTER
-      && (TEST_HARD_REG_BIT
-         (reg_class_contents[(int) CLASS_CANNOT_CHANGE_SIZE],
-          REGNO (SUBREG_REG (x))))
-      && (GET_MODE_SIZE (GET_MODE (x))
-         != GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))))
-    return x;
-#endif
-
   switch (GET_CODE (x))
     {
     case ZERO_EXTEND:
@@ -6106,17 +6085,6 @@ force_to_mode (x, mode, mask, reg, just_select)
       break;
 
     case SUBREG:
-#ifdef CLASS_CANNOT_CHANGE_SIZE
-      if (GET_CODE (SUBREG_REG (x)) == REG
-         && REGNO (SUBREG_REG (x)) < FIRST_PSEUDO_REGISTER
-         && (TEST_HARD_REG_BIT
-             (reg_class_contents[(int) CLASS_CANNOT_CHANGE_SIZE],
-              REGNO (SUBREG_REG (x))))
-         && (GET_MODE_SIZE (GET_MODE (x))
-             != GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))))
-       return x;
-#endif
-
       if (subreg_lowpart_p (x)
          /* We can ignore the effect of this SUBREG if it narrows the mode or
             if the constant masks to zero all the bits the mode doesn't
index 50c6597281902e79b6e6a23feb1718cd39be0347..394c14a05808f3b9e812ddae0d96c5e4d8196e1c 100644 (file)
@@ -47,6 +47,7 @@ Boston, MA 02111-1307, USA.  */
 #include "function.h"
 #include "expr.h"
 #include "regs.h"
+#include "hard-reg-set.h"
 #include "insn-config.h"
 #include "real.h"
 #include "obstack.h"
@@ -681,6 +682,14 @@ gen_lowpart_common (mode, x)
               /* integrate.c can't handle parts of a return value register. */
               && (! REG_FUNCTION_VALUE_P (x)
                   || ! rtx_equal_function_value_matters)
+#ifdef CLASS_CANNOT_CHANGE_SIZE
+              && ! (GET_MODE_SIZE (mode) != GET_MODE_SIZE (GET_MODE (x))
+                    && GET_MODE_CLASS (GET_MODE (x)) != MODE_COMPLEX_INT
+                    && GET_MODE_CLASS (GET_MODE (x)) != MODE_COMPLEX_FLOAT
+                    && (TEST_HARD_REG_BIT
+                        (reg_class_contents[(int) CLASS_CANNOT_CHANGE_SIZE],
+                         REGNO (x))))
+#endif
               /* We want to keep the stack, frame, and arg pointers
                  special.  */
               && x != frame_pointer_rtx