diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0388-PR-target-49186.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0388-PR-target-49186.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0388-PR-target-49186.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0388-PR-target-49186.patch new file mode 100644 index 0000000000..b12cf14ac9 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0388-PR-target-49186.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From 55f5d999fdde931e7c015bed37510c46234bb459 Mon Sep 17 00:00:00 2001 | ||
2 | From: kkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Sun, 5 Jun 2011 21:47:42 +0000 | ||
4 | Subject: [PATCH] PR target/49186 | ||
5 | * config/sh/sh.c (expand_cbranchdi4): Set msw_skip when the high | ||
6 | part of the second operand is 0. | ||
7 | * gcc.c-torture/execute/pr49186.c: New. | ||
8 | |||
9 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@174665 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
10 | |||
11 | index ffe84b1..05acb0a 100644 | ||
12 | --- a/gcc/config/sh/sh.c | ||
13 | +++ b/gcc/config/sh/sh.c | ||
14 | @@ -2131,7 +2131,10 @@ expand_cbranchdi4 (rtx *operands, enum rtx_code comparison) | ||
15 | else if (op2h != CONST0_RTX (SImode)) | ||
16 | msw_taken = LTU; | ||
17 | else | ||
18 | - break; | ||
19 | + { | ||
20 | + msw_skip = swap_condition (LTU); | ||
21 | + break; | ||
22 | + } | ||
23 | msw_skip = swap_condition (msw_taken); | ||
24 | } | ||
25 | break; | ||
26 | new file mode 100644 | ||
27 | index 0000000..743815b | ||
28 | --- /dev/null | ||
29 | +++ b/gcc/testsuite/gcc.c-torture/execute/pr49186.c | ||
30 | @@ -0,0 +1,15 @@ | ||
31 | +/* PR target/49186 */ | ||
32 | +extern void abort (void); | ||
33 | + | ||
34 | +int | ||
35 | +main () | ||
36 | +{ | ||
37 | + int x; | ||
38 | + unsigned long long uv = 0x1000000001ULL; | ||
39 | + | ||
40 | + x = (uv < 0x80) ? 1 : ((uv < 0x800) ? 2 : 3); | ||
41 | + if (x != 3) | ||
42 | + abort (); | ||
43 | + | ||
44 | + return 0; | ||
45 | +} | ||
46 | -- | ||
47 | 1.7.0.4 | ||
48 | |||