387e02a78998375b1872b4544099c48f81006354
[openwrt/openwrt.git] / toolchain / gcc / patches / linaro / 860-fix_extension_elimination.patch
1 https://bugs.launchpad.net/gcc-linaro/+bug/728315
2 https://lists.openwrt.org/pipermail/openwrt-devel/2011-March/009847.html
3
4 --- a/gcc/ee.c
5 +++ b/gcc/ee.c
6 @@ -209,7 +209,11 @@
7
8 *regno = REGNO (reg);
9
10 - if (paradoxical_subreg_p (use))
11 + /* Non-paradoxical SUBREGs of promoted vars guarantee that the
12 + upper (elided) bits of the inner register have a particular value.
13 + For our purposes, such SUBREGs act as a full reference to the
14 + inner register. */
15 + if (paradoxical_subreg_p (use) || SUBREG_PROMOTED_VAR_P (use))
16 *size = GET_MODE_BITSIZE (GET_MODE (reg));
17 else
18 *size = subreg_lsb (use) + GET_MODE_BITSIZE (GET_MODE (use));