Patch from John Carr to fix sparc v9 failure.
authorJohn Carr <jfc@mit.edu>
Fri, 17 Apr 1998 14:41:49 +0000 (14:41 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Fri, 17 Apr 1998 14:41:49 +0000 (07:41 -0700)
* emit-rtl.c (operand_subword_force): If a register can not be
accessed by words, copy it to a pseudo register.

From-SVN: r19267

gcc/ChangeLog
gcc/emit-rtl.c

index d19b93ea7b6c367bf8f33088cfc4afa9195aa13c..9790268131900e82bd173f3c9b279c3f09c9387d 100644 (file)
@@ -1,3 +1,8 @@
+Fri Apr 17 14:30:37 1998  John Carr <jfc@mit.edu>
+
+       * emit-rtl.c (operand_subword_force): If a register can not be
+       accessed by words, copy it to a pseudo register.
+
 Fri Apr 17 14:30:37 1998  Jim Wilson  <wilson@cygnus.com>
 
        * rs6000/vxppc.h (CPP_SPEC): Add support for mrelocatable*.
index 4d9361ce9bc5bebe8911b73e9703bf03cd6ac149..40b0aa54e5199aab5d7509dbcf2fddc3b47e147a 100644 (file)
@@ -1380,7 +1380,14 @@ operand_subword_force (op, i, mode)
     return result;
 
   if (mode != BLKmode && mode != VOIDmode)
-    op = force_reg (mode, op);
+    {
+      /* If this is a register which can not be accessed by words, copy it
+        to a pseudo register.  */
+      if (GET_CODE (op) == REG)
+       op = copy_to_reg (op);
+      else
+       op = force_reg (mode, op);
+    }
 
   result = operand_subword (op, i, 1, mode);
   if (result == 0)