re PR middle-end/32693 ([H8] : ICE: in gen_rtx_SUBREG, at emit-rtl.c:693)
authorJeff Law <law@redhat.com>
Wed, 3 Mar 2010 22:10:17 +0000 (15:10 -0700)
committerJeff Law <law@gcc.gnu.org>
Wed, 3 Mar 2010 22:10:17 +0000 (15:10 -0700)
* PR middle-end/32693
* expmed.c (store_bit_field_1): Use gen_lowpart_SUBREG rather
than gen_rtx_SUBREG.
(extract_bit_field_1): Likewise.

From-SVN: r157207

gcc/ChangeLog
gcc/expmed.c

index a65ea60aa5a36c6a7049b3df1df4d8f13b95838b..d9bcac0aa47b21a7d268db28b586a6adf2fabb06 100644 (file)
@@ -1,3 +1,10 @@
+2010-03-03  Jeff Law  <law@redhat.com>
+
+       * PR middle-end/32693
+       * expmed.c (store_bit_field_1): Use gen_lowpart_SUBREG rather
+       than gen_rtx_SUBREG.
+       (extract_bit_field_1): Likewise.
+
 2010-03-03  Janis Johnson  <janis187@us.ibm.com>
 
        * doc/sourcebuild.texi (Test directives): Document that arguments
index ab42fd0a673dc35e3dc49b5053f88a9d118accad..aa2409942d9dd9d070d7dc2443d0bc1ac0806920 100644 (file)
@@ -698,7 +698,7 @@ store_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
           and we will need the original value of op0 if insv fails.  */
        xop0 = gen_rtx_SUBREG (op_mode, SUBREG_REG (xop0), SUBREG_BYTE (xop0));
       if (REG_P (xop0) && GET_MODE (xop0) != op_mode)
-       xop0 = gen_rtx_SUBREG (op_mode, xop0, 0);
+       xop0 = gen_lowpart_SUBREG (op_mode, xop0);
 
       /* If the destination is a paradoxical subreg such that we need a
         truncate to the inner mode, perform the insertion on a temporary and
@@ -1542,7 +1542,7 @@ extract_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
       /* If op0 is a register, we need it in EXT_MODE to make it
         acceptable to the format of ext(z)v.  */
       if (REG_P (xop0) && GET_MODE (xop0) != ext_mode)
-       xop0 = gen_rtx_SUBREG (ext_mode, xop0, 0);
+       xop0 = gen_lowpart_SUBREG (ext_mode, xop0);
       if (MEM_P (xop0))
        /* Get ref to first byte containing part of the field.  */
        xop0 = adjust_address (xop0, byte_mode, xoffset);