diff options
Diffstat (limited to 'recipes-devtools/gcc/gcc-4.5/gcc-arm-qihi-split-PR46883.patch')
-rw-r--r-- | recipes-devtools/gcc/gcc-4.5/gcc-arm-qihi-split-PR46883.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/recipes-devtools/gcc/gcc-4.5/gcc-arm-qihi-split-PR46883.patch b/recipes-devtools/gcc/gcc-4.5/gcc-arm-qihi-split-PR46883.patch new file mode 100644 index 0000000000..2cb5635da4 --- /dev/null +++ b/recipes-devtools/gcc/gcc-4.5/gcc-arm-qihi-split-PR46883.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | Backport of http://gcc.gnu.org/ml/gcc-patches/2010-12/msg01096.html | ||
2 | This should fix the ICE found in samba | ||
3 | |||
4 | -Khem | ||
5 | |||
6 | Index: a/gcc/config/arm/arm.md | ||
7 | =================================================================== | ||
8 | --- a/gcc/config/arm/arm.md (revision 167797) | ||
9 | +++ b/gcc/config/arm/arm.md (working copy) | ||
10 | @@ -4137,8 +4137,8 @@ | ||
11 | }) | ||
12 | |||
13 | (define_split | ||
14 | - [(set (match_operand:SI 0 "register_operand" "") | ||
15 | - (zero_extend:SI (match_operand:HI 1 "register_operand" "")))] | ||
16 | + [(set (match_operand:SI 0 "s_register_operand" "") | ||
17 | + (zero_extend:SI (match_operand:HI 1 "s_register_operand" "")))] | ||
18 | "!TARGET_THUMB2 && !arm_arch6" | ||
19 | [(set (match_dup 0) (ashift:SI (match_dup 2) (const_int 16))) | ||
20 | (set (match_dup 0) (lshiftrt:SI (match_dup 0) (const_int 16)))] | ||
21 | @@ -4244,8 +4244,8 @@ | ||
22 | }) | ||
23 | |||
24 | (define_split | ||
25 | - [(set (match_operand:SI 0 "register_operand" "") | ||
26 | - (zero_extend:SI (match_operand:QI 1 "register_operand" "")))] | ||
27 | + [(set (match_operand:SI 0 "s_register_operand" "") | ||
28 | + (zero_extend:SI (match_operand:QI 1 "s_register_operand" "")))] | ||
29 | "!arm_arch6" | ||
30 | [(set (match_dup 0) (ashift:SI (match_dup 2) (const_int 24))) | ||
31 | (set (match_dup 0) (lshiftrt:SI (match_dup 0) (const_int 24)))] | ||
32 | Index: a/gcc/testsuite/gcc.target/arm/pr46883.c | ||
33 | =================================================================== | ||
34 | --- a/gcc/testsuite/gcc.target/arm/pr46883.c (revision 0) | ||
35 | +++ b/gcc/testsuite/gcc.target/arm/pr46883.c (revision 0) | ||
36 | @@ -0,0 +1,16 @@ | ||
37 | +/* { dg-do compile } */ | ||
38 | +/* { dg-options "-O1 -march=armv5te" } */ | ||
39 | + | ||
40 | +void bar (unsigned char *q, unsigned short *data16s, int len) | ||
41 | +{ | ||
42 | + int i; | ||
43 | + | ||
44 | + for (i = 0; i < len; i++) | ||
45 | + { | ||
46 | + q[2 * i] = | ||
47 | + (((data16s[i] & 0xFF) << 8) | ((data16s[i] >> 8) & 0xFF)) & 0xFF; | ||
48 | + q[2 * i + 1] = | ||
49 | + ((unsigned short) | ||
50 | + (((data16s[i] & 0xFF) << 8) | ((data16s[i] >> 8) & 0xFF))) >> 8; | ||
51 | + } | ||
52 | +} | ||