function.c (purge_addressof_1): If trying to take a sub-word integral piece of a...
authorDavid S. Miller <davem@pierdol.cobaltmicro.com>
Sun, 4 Oct 1998 01:29:21 +0000 (01:29 +0000)
committerDavid S. Miller <davem@gcc.gnu.org>
Sun, 4 Oct 1998 01:29:21 +0000 (18:29 -0700)
* function.c (purge_addressof_1): If trying to take a sub-word
integral piece of a floating point mode, put it on the stack.

From-SVN: r22804

gcc/ChangeLog
gcc/function.c

index d0b566c6e3df7f2ee1787c1fdfe0d877609542fe..44610f309ada92adebd1d2a8d32eee578f18f892 100644 (file)
@@ -1,3 +1,8 @@
+Sun Oct  4 00:23:00 1998  David S. Miller  <davem@pierdol.cobaltmicro.com>
+
+       * function.c (purge_addressof_1): If trying to take a sub-word
+       integral piece of a floating point mode, put it on the stack.
+
 Sat Oct  3 19:01:03 1998  Richard Henderson  <rth@cygnus.com>
 
        * alpha/linux.h (CPP_PREDEFINES): Define __alpha__ for imake.
index 41f400e1c528701b94a10d8665186f1edef9383c..5e607597f4f6cd8cf91237973a9ca3d1d630ebbf 100644 (file)
@@ -2881,6 +2881,17 @@ purge_addressof_1 (loc, insn, force, store)
 
              rtx val, seq;
 
+             /* We cannot do this if we are trying to pick out
+                an integral piece, smaller than a word, of a
+                floating point value.  */
+             if (INTEGRAL_MODE_P (GET_MODE (x))
+                 && GET_MODE_SIZE (GET_MODE (x)) < UNITS_PER_WORD
+                 && FLOAT_MODE_P (GET_MODE (sub)))
+               {
+                 put_addressof_into_stack (XEXP (x, 0));
+                 return;
+               }
+
              if (store)
                {
                  /* If we can't replace with a register, be afraid.  */