]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
(push_reload): Abort is secondary_reload wants same
authorJim Wilson <wilson@gcc.gnu.org>
Tue, 31 Aug 1993 21:22:41 +0000 (14:22 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 31 Aug 1993 21:22:41 +0000 (14:22 -0700)
class as an input reload.

From-SVN: r5236

gcc/reload.c

index c88d6519a4a5a4e2c44fb8989f7d268c2f45e881..f3e880224bbfa824f13f408876ca1cc6f2c55f56 100644 (file)
@@ -1006,6 +1006,21 @@ push_reload (in, out, inloc, outloc, class,
               : type == RELOAD_FOR_OUTPUT ? RELOAD_FOR_OUTPUT_ADDRESS
               : type);
 
+         /* This case isn't valid, so fail.  Reload is allowed to use the
+            same register for RELOAD_FOR_INPUT_ADDRESS and RELOAD_FOR_INPUT
+            reloads, but in the case of a secondary register, we actually
+            need two different registers for correct code.  We fail here
+            to prevent the possibility of silently generating incorrect code
+            later.
+
+            The convention is that secondary input reloads are valid only if
+            the secondary_class is different from class.  If you have such
+            a case, you can not use secondary reloads, you must work around
+            the problem some other way.  */
+
+         if (type == RELOAD_FOR_INPUT && secondary_class == class)
+           abort ();
+
          /* If we need a tertiary reload, see if we have one we can reuse
             or else make one.  */