aboutsummaryrefslogtreecommitdiff
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2013-02-03 11:13:51 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2013-02-03 11:13:51 +0000
commitc0a8a3e6fd651e4c835ca75864390c92efe9b9b7 (patch)
treeefbb771b3a388d61f8226c7ed36bf91657873d70 /gcc/expmed.c
parent5031121c4390a074d77907f702f29d070a317302 (diff)
downloadgcc-c0a8a3e6fd651e4c835ca75864390c92efe9b9b7.zip
gcc-c0a8a3e6fd651e4c835ca75864390c92efe9b9b7.tar.gz
gcc-c0a8a3e6fd651e4c835ca75864390c92efe9b9b7.tar.bz2
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
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index da37e6b..4a6ddb0 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,