diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0266-config-i386-i386.md-movxf_internal-Disable-CONST_DOU.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0266-config-i386-i386.md-movxf_internal-Disable-CONST_DOU.patch | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0266-config-i386-i386.md-movxf_internal-Disable-CONST_DOU.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0266-config-i386-i386.md-movxf_internal-Disable-CONST_DOU.patch new file mode 100644 index 0000000000..0318cf413e --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0266-config-i386-i386.md-movxf_internal-Disable-CONST_DOU.patch | |||
@@ -0,0 +1,127 @@ | |||
1 | From da3b2b8ec5f3057e53934d825ff46f5f20be7362 Mon Sep 17 00:00:00 2001 | ||
2 | From: uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Mon, 16 May 2011 20:29:20 +0000 | ||
4 | Subject: [PATCH] * config/i386/i386.md (*movxf_internal): Disable CONST_DOUBLE | ||
5 | optimization for CM_MEDIUM and CM_LARGE code models. Fix usage | ||
6 | of standard_80387_constant_p. | ||
7 | (*movxf_internal_nointeger): Ditto. | ||
8 | (*movdf_internal): Remove dead code-size optimization. | ||
9 | (*movdf_internal_rex64): Fix usage of standard_80387_constant_p. | ||
10 | (*movdf_internal_nointeger): Ditto. | ||
11 | (*movsf_internal): Ditto. | ||
12 | (floating point move splitters): Ditto. | ||
13 | * config/i386/constraints.md (G): Ditto. | ||
14 | * config/i386/i386.c (ix86_preferred_reload_class): Ditto. | ||
15 | |||
16 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@173803 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
17 | |||
18 | index 89722bb..4bc3ed6 100644 | ||
19 | --- a/gcc/config/i386/constraints.md | ||
20 | +++ b/gcc/config/i386/constraints.md | ||
21 | @@ -149,7 +149,7 @@ | ||
22 | (define_constraint "G" | ||
23 | "Standard 80387 floating point constant." | ||
24 | (and (match_code "const_double") | ||
25 | - (match_test "standard_80387_constant_p (op)"))) | ||
26 | + (match_test "standard_80387_constant_p (op) > 0"))) | ||
27 | |||
28 | ;; This can theoretically be any mode's CONST0_RTX. | ||
29 | (define_constraint "C" | ||
30 | diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c | ||
31 | index e8210c5..e8b9af5 100644 | ||
32 | --- a/gcc/config/i386/i386.c | ||
33 | +++ b/gcc/config/i386/i386.c | ||
34 | @@ -28252,7 +28252,7 @@ ix86_preferred_reload_class (rtx x, reg_class_t regclass) | ||
35 | zero above. We only want to wind up preferring 80387 registers if | ||
36 | we plan on doing computation with them. */ | ||
37 | if (TARGET_80387 | ||
38 | - && standard_80387_constant_p (x)) | ||
39 | + && standard_80387_constant_p (x) > 0) | ||
40 | { | ||
41 | /* Limit class to non-sse. */ | ||
42 | if (regclass == FLOAT_SSE_REGS) | ||
43 | diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md | ||
44 | index 9db8a74..3bfa0b3 100644 | ||
45 | --- a/gcc/config/i386/i386.md | ||
46 | +++ b/gcc/config/i386/i386.md | ||
47 | @@ -2836,6 +2836,7 @@ | ||
48 | "optimize_function_for_speed_p (cfun) | ||
49 | && !(MEM_P (operands[0]) && MEM_P (operands[1])) | ||
50 | && (reload_in_progress || reload_completed | ||
51 | + || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE) | ||
52 | || GET_CODE (operands[1]) != CONST_DOUBLE | ||
53 | || memory_operand (operands[0], XFmode))" | ||
54 | { | ||
55 | @@ -2865,7 +2866,8 @@ | ||
56 | "optimize_function_for_size_p (cfun) | ||
57 | && !(MEM_P (operands[0]) && MEM_P (operands[1])) | ||
58 | && (reload_in_progress || reload_completed | ||
59 | - || standard_80387_constant_p (operands[1]) | ||
60 | + || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE) | ||
61 | + || standard_80387_constant_p (operands[1]) > 0 | ||
62 | || GET_CODE (operands[1]) != CONST_DOUBLE | ||
63 | || memory_operand (operands[0], XFmode))" | ||
64 | { | ||
65 | @@ -2911,7 +2913,7 @@ | ||
66 | || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE) | ||
67 | || (!(TARGET_SSE2 && TARGET_SSE_MATH) | ||
68 | && optimize_function_for_size_p (cfun) | ||
69 | - && standard_80387_constant_p (operands[1])) | ||
70 | + && standard_80387_constant_p (operands[1]) > 0) | ||
71 | || GET_CODE (operands[1]) != CONST_DOUBLE | ||
72 | || memory_operand (operands[0], DFmode))" | ||
73 | { | ||
74 | @@ -3078,9 +3080,6 @@ | ||
75 | && TARGET_INTEGER_DFMODE_MOVES | ||
76 | && (reload_in_progress || reload_completed | ||
77 | || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE) | ||
78 | - || (!(TARGET_SSE2 && TARGET_SSE_MATH) | ||
79 | - && optimize_function_for_size_p (cfun) | ||
80 | - && standard_80387_constant_p (operands[1])) | ||
81 | || GET_CODE (operands[1]) != CONST_DOUBLE | ||
82 | || memory_operand (operands[0], DFmode))" | ||
83 | { | ||
84 | @@ -3249,11 +3248,10 @@ | ||
85 | || (!(TARGET_SSE2 && TARGET_SSE_MATH) | ||
86 | && optimize_function_for_size_p (cfun) | ||
87 | && !memory_operand (operands[0], DFmode) | ||
88 | - && standard_80387_constant_p (operands[1])) | ||
89 | + && standard_80387_constant_p (operands[1]) > 0) | ||
90 | || GET_CODE (operands[1]) != CONST_DOUBLE | ||
91 | || ((optimize_function_for_size_p (cfun) | ||
92 | - || !TARGET_MEMORY_MISMATCH_STALL | ||
93 | - || reload_in_progress || reload_completed) | ||
94 | + || !TARGET_MEMORY_MISMATCH_STALL) | ||
95 | && memory_operand (operands[0], DFmode)))" | ||
96 | { | ||
97 | switch (which_alternative) | ||
98 | @@ -3427,7 +3425,7 @@ | ||
99 | && (reload_in_progress || reload_completed | ||
100 | || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE) | ||
101 | || (!TARGET_SSE_MATH && optimize_function_for_size_p (cfun) | ||
102 | - && standard_80387_constant_p (operands[1])) | ||
103 | + && standard_80387_constant_p (operands[1]) > 0) | ||
104 | || GET_CODE (operands[1]) != CONST_DOUBLE | ||
105 | || memory_operand (operands[0], SFmode))" | ||
106 | { | ||
107 | @@ -3540,7 +3538,7 @@ | ||
108 | } | ||
109 | else if (FP_REG_P (r)) | ||
110 | { | ||
111 | - if (!standard_80387_constant_p (c)) | ||
112 | + if (standard_80387_constant_p (c) < 1) | ||
113 | FAIL; | ||
114 | } | ||
115 | else if (MMX_REG_P (r)) | ||
116 | @@ -3572,7 +3570,7 @@ | ||
117 | } | ||
118 | else if (FP_REG_P (r)) | ||
119 | { | ||
120 | - if (!standard_80387_constant_p (c)) | ||
121 | + if (standard_80387_constant_p (c) < 1) | ||
122 | FAIL; | ||
123 | } | ||
124 | else if (MMX_REG_P (r)) | ||
125 | -- | ||
126 | 1.7.0.4 | ||
127 | |||