From: Richard Sandiford Date: Sun, 3 Feb 2013 11:13:51 +0000 (+0000) Subject: expmed.c (extract_bit_field_1): Pass the full width of the structure to get_best_reg_... X-Git-Tag: releases/gcc-4.8.0~657 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c0a8a3e6fd651e4c835ca75864390c92efe9b9b7;p=thirdparty%2Fgcc.git expmed.c (extract_bit_field_1): Pass the full width of the structure to get_best_reg_extraction_insn. gcc/ * expmed.c (extract_bit_field_1): Pass the full width of the structure to get_best_reg_extraction_insn. From-SVN: r195692 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8af4967c7183..b12b46590c6c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-02-03 Richard Sandiford + + * expmed.c (extract_bit_field_1): Pass the full width of the + structure to get_best_reg_extraction_insn. + 2013-02-01 David Edelsohn PR target/54601 diff --git a/gcc/expmed.c b/gcc/expmed.c index da37e6b81850..4a6ddb06b110 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -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,