This patch backports the upstream fix in r171347 for a problem caused by change in ...
13 years, 5 months ago
(2011-11-16 08:51:13 UTC)
#1
This patch backports the upstream fix in r171347 for a problem caused by
change in volatile bitfield access. This is tested by building the
x86 toolchain with tests and checking that volatile bitfield access worked
on ARM. This is a backport for 4.6 only.
2011-11-16 Doug Kwan <dougkwan@google.com>
Backport r171347 from trunk.
2011-03-23 Julian Brown <julian@codesourcery.com>
* expr.c (expand_expr_real_1): Only use BLKmode for volatile
accesses which are not naturally aligned.
Index: gcc/expr.c
===================================================================
--- gcc/expr.c (revision 181400)
+++ gcc/expr.c (working copy)
@@ -9200,8 +9200,11 @@
&& modifier != EXPAND_CONST_ADDRESS
&& modifier != EXPAND_INITIALIZER)
/* If the field is volatile, we always want an aligned
- access. */
- || (volatilep && flag_strict_volatile_bitfields > 0)
+ access. Only do this if the access is not already naturally
+ aligned, otherwise "normal" (non-bitfield) volatile fields
+ become non-addressable. */
+ || (volatilep && flag_strict_volatile_bitfields > 0
+ && (bitpos % GET_MODE_ALIGNMENT (mode) != 0))
/* If the field isn't aligned enough to fetch as a memref,
fetch it as a bit field. */
|| (mode1 != BLKmode
--
This patch is available for review at http://codereview.appspot.com/5396043
On Wed, Nov 16, 2011 at 03:51, Doug Kwan <dougkwan@google.com> wrote: > This patch backports ...
13 years, 5 months ago
(2011-11-16 15:07:19 UTC)
#2
On Wed, Nov 16, 2011 at 03:51, Doug Kwan <dougkwan@google.com> wrote:
> This patch backports the upstream fix in r171347 for a problem caused by
> change in volatile bitfield access. This is tested by building the
> x86 toolchain with tests and checking that volatile bitfield access worked
> on ARM. This is a backport for 4.6 only.
>
> 2011-11-16 Doug Kwan <dougkwan@google.com>
>
> Backport r171347 from trunk.
>
> 2011-03-23 Julian Brown <julian@codesourcery.com>
>
> * expr.c (expand_expr_real_1): Only use BLKmode for volatile
> accesses which are not naturally aligned.
OK. Were there any testsuite changes for this patch?
Diego.
On 16/11/11 08:51, Doug Kwan wrote: > This patch backports the upstream fix in r171347 ...
13 years, 5 months ago
(2011-11-16 16:41:49 UTC)
#3
On 16/11/11 08:51, Doug Kwan wrote:
> This patch backports the upstream fix in r171347 for a problem caused by
> change in volatile bitfield access. This is tested by building the
> x86 toolchain with tests and checking that volatile bitfield access worked
> on ARM. This is a backport for 4.6 only.
>
> 2011-11-16 Doug Kwan <dougkwan@google.com>
>
> Backport r171347 from trunk.
>
> 2011-03-23 Julian Brown <julian@codesourcery.com>
>
> * expr.c (expand_expr_real_1): Only use BLKmode for volatile
> accesses which are not naturally aligned.
>
So Joey Ye posted the following patch, which I think is needed to fix a
regression that that patch introduces.
http://gcc.gnu.org/ml/gcc-patches/2011-11/msg01390.html
However, it's not been reviewed yet :-(
R.
Thanks Richard. I will wait for that patch. -Doug On Wed, Nov 16, 2011 at ...
13 years, 5 months ago
(2011-11-16 21:11:52 UTC)
#4
Thanks Richard. I will wait for that patch.
-Doug
On Wed, Nov 16, 2011 at 8:41 AM, Richard Earnshaw <rearnsha@arm.com> wrote:
> On 16/11/11 08:51, Doug Kwan wrote:
>> This patch backports the upstream fix in r171347 for a problem caused by
>> change in volatile bitfield access. This is tested by building the
>> x86 toolchain with tests and checking that volatile bitfield access worked
>> on ARM. This is a backport for 4.6 only.
>>
>> 2011-11-16 Doug Kwan <dougkwan@google.com>
>>
>> Backport r171347 from trunk.
>>
>> 2011-03-23 Julian Brown <julian@codesourcery.com>
>>
>> * expr.c (expand_expr_real_1): Only use BLKmode for volatile
>> accesses which are not naturally aligned.
>>
> So Joey Ye posted the following patch, which I think is needed to fix a
> regression that that patch introduces.
>
> http://gcc.gnu.org/ml/gcc-patches/2011-11/msg01390.html
>
> However, it's not been reviewed yet :-(
>
> R.
>
>
Issue 5396043: [google] Backport r171347 from trunk to google/gcc-4_6
Created 13 years, 5 months ago by dougkwan
Modified 13 years, 5 months ago
Reviewers: Diego Novillo, rearnsha_arm.com
Base URL: svn+ssh://gcc.gnu.org/svn/gcc/branches/google/gcc-4_6/
Comments: 0