summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/volatile_access_backport.patch
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2011-06-01 17:50:22 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-02 14:47:26 +0100
commit347c30801b6f935a6aefa5578d723a8afcf52790 (patch)
tree53e69648d210df3c90a0554abd4ac63e0d3c2d9b /meta/recipes-devtools/gcc/gcc-4.6.0/volatile_access_backport.patch
parentd3fc33760a80b0a067b41ff88e99941f1c40c8f9 (diff)
downloadopenembedded-core-347c30801b6f935a6aefa5578d723a8afcf52790.tar.gz
openembedded-core-347c30801b6f935a6aefa5578d723a8afcf52790.tar.bz2
openembedded-core-347c30801b6f935a6aefa5578d723a8afcf52790.tar.xz
openembedded-core-347c30801b6f935a6aefa5578d723a8afcf52790.zip
gcc: Fix volatile access issue for ARM
[YOCTO #1130] This patch brings in a patch from gcc for the following issue: http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01477.html Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/volatile_access_backport.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/volatile_access_backport.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/volatile_access_backport.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/volatile_access_backport.patch
new file mode 100644
index 000000000..9c8681728
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/volatile_access_backport.patch
@@ -0,0 +1,28 @@
+Pulled from http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01477.html
+
+Upstream-Status: Backport
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+ gcc/
+ * expr.c (expand_expr_real_1): Only use BLKmode for volatile
+ accesses which are not naturally aligned.
+
+Index: gcc-4.6.0/gcc/expr.c
+===================================================================
+--- gcc-4.6.0.orig/gcc/expr.c 2011-06-01 15:28:55.000000000 -0700
++++ gcc-4.6.0/gcc/expr.c 2011-06-01 15:41:17.154848182 -0700
+@@ -9178,8 +9178,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