]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc/
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 3 Feb 2013 11:13:51 +0000 (11:13 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 3 Feb 2013 11:13:51 +0000 (11:13 +0000)
* expmed.c (extract_bit_field_1): Pass the full width of the
structure to get_best_reg_extraction_insn.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195692 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/expmed.c

index 8af4967c718346a28004cfbb3cf1ebfdd9235576..b12b46590c6ce0a87134cc4e6d4fea5b84116814 100644 (file)
@@ -1,3 +1,8 @@
+2013-02-03  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * expmed.c (extract_bit_field_1): Pass the full width of the
+       structure to get_best_reg_extraction_insn.
+
 2013-02-01  David Edelsohn  <dje.gcc@gmail.com>
 
        PR target/54601
index da37e6b81850c9bd1042924256d2e2ef55c4eb6f..4a6ddb06b1105f68ffaac17d1c15dd555c957d8c 100644 (file)
@@ -1569,7 +1569,11 @@ extract_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
   enum extraction_pattern pattern = unsignedp ? EP_extzv : EP_extv;
   extraction_insn extv;
   if (!MEM_P (op0)
-      && get_best_reg_extraction_insn (&extv, pattern, bitnum + bitsize,
+      /* ??? We could limit the structure size to the part of OP0 that
+        contains the field, with appropriate checks for endianness
+        and TRULY_NOOP_TRUNCATION.  */
+      && get_best_reg_extraction_insn (&extv, pattern,
+                                      GET_MODE_BITSIZE (GET_MODE (op0)),
                                       tmode))
     {
       rtx result = extract_bit_field_using_extv (&extv, op0, bitsize, bitnum,