]> gcc.gnu.org Git - gcc.git/commitdiff
expmed.c (store_bit_field): Use simplify_gen_subreg instead of gen_rtx_SUBREG directly.
authorRichard Henderson <rth@redhat.com>
Wed, 1 Dec 2004 17:49:20 +0000 (09:49 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 1 Dec 2004 17:49:20 +0000 (09:49 -0800)
        * expmed.c (store_bit_field): Use simplify_gen_subreg instead
        of gen_rtx_SUBREG directly.

From-SVN: r91569

gcc/ChangeLog
gcc/expmed.c

index 6bd3d49c877bb56a1e49097f96eb3e3fd1915110..bae8a778321b425ef9f938b77fe416d7d0046f23 100644 (file)
@@ -1,3 +1,8 @@
+2004-12-01  Richard Henderson  <rth@redhat.com>
+
+       * expmed.c (store_bit_field): Use simplify_gen_subreg instead
+       of gen_rtx_SUBREG directly.
+
 2004-12-01  David Edelsohn  <edelsohn@gnu.org>
            Nathan Sidwell  <nathan@codesourcery.com>
 
index 37d6768b266196bd9956a53c210ad31fca3d700d..fe0db062b5628a848fb877469562f79795365b86 100644 (file)
@@ -431,21 +431,11 @@ store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
     {
       if (GET_MODE (op0) != fieldmode)
        {
-         if (GET_CODE (op0) == SUBREG)
-           {
-             /* Else we've got some float mode source being extracted
-                into a different float mode destination -- this
-                combination of subregs results in Severe Tire
-                Damage.  */
-             gcc_assert (GET_MODE (SUBREG_REG (op0)) == fieldmode
-                         || GET_MODE_CLASS (fieldmode) == MODE_INT
-                         || GET_MODE_CLASS (fieldmode) == MODE_PARTIAL_INT);
-             op0 = SUBREG_REG (op0);
-           }
-         if (REG_P (op0))
-           op0 = gen_rtx_SUBREG (fieldmode, op0, byte_offset);
-         else
+         if (MEM_P (op0))
            op0 = adjust_address (op0, fieldmode, offset);
+         else
+           op0 = simplify_gen_subreg (fieldmode, op0, GET_MODE (op0),
+                                      byte_offset);
        }
       emit_move_insn (op0, value);
       return value;
This page took 0.086758 seconds and 5 git commands to generate.