diff options
author | Olivier Hainque <hainque@act-europe.fr> | 2003-05-05 19:56:35 +0200 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2003-05-05 13:56:35 -0400 |
commit | 9e5f281f99de583a0ca9d50d984bd3a33910f430 (patch) | |
tree | 33a4fc54a6ce90abebc59cf481818d05dcdbf7ab /gcc/expr.c | |
parent | f5119d10faca5f15af8293286b518ef342817629 (diff) | |
download | gcc-9e5f281f99de583a0ca9d50d984bd3a33910f430.zip gcc-9e5f281f99de583a0ca9d50d984bd3a33910f430.tar.gz gcc-9e5f281f99de583a0ca9d50d984bd3a33910f430.tar.bz2 |
expr.c (expand_expr, [...]): Refine the test forcing usage of bitfield instructions for mode1 != BLKmode...
* expr.c (expand_expr, case BIT_FIELD_REF): Refine the test forcing
usage of bitfield instructions for mode1 != BLKmode, only ignoring
SLOW_UNALIGNED_ACCESS if the field is not byte aligned.
(store_field): Likewise.
From-SVN: r66492
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -5626,9 +5626,10 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode, unsignedp, type, /* If the field isn't aligned enough to store as an ordinary memref, store it as a bit field. */ || (mode != BLKmode - && ((SLOW_UNALIGNED_ACCESS (mode, MEM_ALIGN (target)) - && (MEM_ALIGN (target) < GET_MODE_ALIGNMENT (mode))) - || bitpos % GET_MODE_ALIGNMENT (mode))) + && ((((MEM_ALIGN (target) < GET_MODE_ALIGNMENT (mode)) + || bitpos % GET_MODE_ALIGNMENT (mode)) + && SLOW_UNALIGNED_ACCESS (mode, MEM_ALIGN (target))) + || (bitpos % BITS_PER_UNIT != 0))) /* If the RHS and field are a constant size and the size of the RHS isn't the same size as the bitfield, we must use bitfield operations. */ @@ -7571,9 +7572,10 @@ expand_expr (exp, target, tmode, modifier) /* If the field isn't aligned enough to fetch as a memref, fetch it as a bit field. */ || (mode1 != BLKmode - && ((TYPE_ALIGN (TREE_TYPE (tem)) < GET_MODE_ALIGNMENT (mode) + && (((TYPE_ALIGN (TREE_TYPE (tem)) < GET_MODE_ALIGNMENT (mode) + || (bitpos % GET_MODE_ALIGNMENT (mode) != 0)) && SLOW_UNALIGNED_ACCESS (mode1, MEM_ALIGN (op0))) - || (bitpos % GET_MODE_ALIGNMENT (mode) != 0))) + || (bitpos % BITS_PER_UNIT != 0))) /* If the type and the field are a constant size and the size of the type isn't the same size as the bitfield, we must use bitfield operations. */ |