1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-02 18:52:30 +02:00
openwrt-xburst/toolchain/gcc/patches/linaro/860-fix_extension_elimination.patch
nbd 882a558332 toolchain/gcc (linaro): fix extension elimination optimization
This applies Richard Sandiford's patch for Linaro GCC as an alternative to disabling the Linaro-specific extension elimination optimization altogether.

Original patch: https://bugs.launchpad.net/gcc-linaro/+bug/728315
Signed-off-by: Mark Mentovai <mark@moxienet.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25871 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-03-04 21:38:15 +00:00

19 lines
678 B
Diff

https://bugs.launchpad.net/gcc-linaro/+bug/728315
https://lists.openwrt.org/pipermail/openwrt-devel/2011-March/009847.html
--- a/gcc/ee.c
+++ b/gcc/ee.c
@@ -209,7 +209,11 @@
*regno = REGNO (reg);
- if (paradoxical_subreg_p (use))
+ /* Non-paradoxical SUBREGs of promoted vars guarantee that the
+ upper (elided) bits of the inner register have a particular value.
+ For our purposes, such SUBREGs act as a full reference to the
+ inner register. */
+ if (paradoxical_subreg_p (use) || SUBREG_PROMOTED_VAR_P (use))
*size = GET_MODE_BITSIZE (GET_MODE (reg));
else
*size = subreg_lsb (use) + GET_MODE_BITSIZE (GET_MODE (use));