diff options
author | Jie Zhang <jie@codesourcery.com> | 2010-10-22 00:40:15 +0000 |
---|---|---|
committer | Jie Zhang <jiez@gcc.gnu.org> | 2010-10-22 00:40:15 +0000 |
commit | 62519f7fed35e45d48401449eb2b65ca801c809d (patch) | |
tree | 62a5cfc99aa1dfe7f47f018537dc4cb2a3f259d6 /gcc/expr.c | |
parent | f40872465cb60b433d661735d2e74c3ec93891c5 (diff) | |
download | gcc-62519f7fed35e45d48401449eb2b65ca801c809d.zip gcc-62519f7fed35e45d48401449eb2b65ca801c809d.tar.gz gcc-62519f7fed35e45d48401449eb2b65ca801c809d.tar.bz2 |
expr.c (emit_group_load_1): Update calls to extract_bit_field.
* expr.c (emit_group_load_1): Update calls to extract_bit_field.
(copy_blkmode_from_reg): Likewise.
(read_complex_part): Likewise.
(expand_expr_real_1): Calculate packedp and pass it to
extract_bit_field.
* expr.h (extract_bit_field): Update declaration.
* calls.c (store_unaligned_arguments_into_pseudos): Update call
to extract_bit_field.
* expmed.c (extract_fixed_bit_field): Update calls to
extract_fixed_bit_field.
(store_split_bit_field): Likewise.
(extract_bit_field_1): Add new argument packedp.
(extract_bit_field): Add new argument packedp.
(extract_fixed_bit_field): Add new argument packedp and let
packed attribute override volatile.
* stmt.c (expand_return): Update call to extract_bit_field.
From-SVN: r165799
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -1703,7 +1703,7 @@ emit_group_load_1 (rtx *tmps, rtx dst, rtx orig_src, tree type, int ssize) && (!REG_P (tmps[i]) || GET_MODE (tmps[i]) != mode)) tmps[i] = extract_bit_field (tmps[i], bytelen * BITS_PER_UNIT, (bytepos % slen0) * BITS_PER_UNIT, - 1, NULL_RTX, mode, mode); + 1, false, NULL_RTX, mode, mode); } else { @@ -1713,7 +1713,7 @@ emit_group_load_1 (rtx *tmps, rtx dst, rtx orig_src, tree type, int ssize) mem = assign_stack_temp (GET_MODE (src), slen, 0); emit_move_insn (mem, src); tmps[i] = extract_bit_field (mem, bytelen * BITS_PER_UNIT, - 0, 1, NULL_RTX, mode, mode); + 0, 1, false, NULL_RTX, mode, mode); } } /* FIXME: A SIMD parallel will eventually lead to a subreg of a @@ -1754,7 +1754,7 @@ emit_group_load_1 (rtx *tmps, rtx dst, rtx orig_src, tree type, int ssize) tmps[i] = src; else tmps[i] = extract_bit_field (src, bytelen * BITS_PER_UNIT, - bytepos * BITS_PER_UNIT, 1, NULL_RTX, + bytepos * BITS_PER_UNIT, 1, false, NULL_RTX, mode, mode); if (shift) @@ -2167,7 +2167,7 @@ copy_blkmode_from_reg (rtx tgtblk, rtx srcreg, tree type) bitpos for the destination store (left justified). */ store_bit_field (dst, bitsize, bitpos % BITS_PER_WORD, copy_mode, extract_bit_field (src, bitsize, - xbitpos % BITS_PER_WORD, 1, + xbitpos % BITS_PER_WORD, 1, false, NULL_RTX, copy_mode, copy_mode)); } @@ -2924,7 +2924,7 @@ read_complex_part (rtx cplx, bool imag_p) } return extract_bit_field (cplx, ibitsize, imag_p ? ibitsize : 0, - true, NULL_RTX, imode, imode); + true, false, NULL_RTX, imode, imode); } /* A subroutine of emit_move_insn_1. Yet another lowpart generator. @@ -8938,6 +8938,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, HOST_WIDE_INT bitsize, bitpos; tree offset; int volatilep = 0, must_force_mem; + bool packedp = false; tree tem = get_inner_reference (exp, &bitsize, &bitpos, &offset, &mode1, &unsignedp, &volatilep, true); rtx orig_op0, memloc; @@ -8947,6 +8948,11 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, infinitely recurse. */ gcc_assert (tem != exp); + if (TYPE_PACKED (TREE_TYPE (TREE_OPERAND (exp, 0))) + || (TREE_CODE (TREE_OPERAND (exp, 1)) == FIELD_DECL + && DECL_PACKED (TREE_OPERAND (exp, 1)))) + packedp = true; + /* If TEM's type is a union of variable size, pass TARGET to the inner computation, since it will need a temporary and TARGET is known to have to do. This occurs in unchecked conversion in Ada. */ @@ -9159,7 +9165,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, if (MEM_P (op0) && REG_P (XEXP (op0, 0))) mark_reg_pointer (XEXP (op0, 0), MEM_ALIGN (op0)); - op0 = extract_bit_field (op0, bitsize, bitpos, unsignedp, + op0 = extract_bit_field (op0, bitsize, bitpos, unsignedp, packedp, (modifier == EXPAND_STACK_PARM ? NULL_RTX : target), ext_mode, ext_mode); |