aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-16 21:19:58 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-16 21:19:58 +0000
commit183252262cda8e4c6e5782b760009f0bd76d5a4f (patch)
treed5aab050004e2dcaa8738b5a243f6b2781685723
parent93198709f4df2bdd820b7ec8e469a01b2fc73407 (diff)
* config/i386/i386.md (*movxf_internal): Disable CONST_DOUBLE
optimization for CM_MEDIUM and CM_LARGE code models. Fix usage of standard_80387_constant_p. (*movxf_internal_nointeger): Ditto. (*movdf_internal): Remove dead code-size optimization. (*movdf_internal_rex64): Fix usage of standard_80387_constant_p. (*movdf_internal_nointeger): Ditto. (*movsf_internal): Ditto. (floating point move splitters): Ditto. * config/i386/constraints.md (G): Ditto. * config/i386/i386.c (ix86_preferred_reload_class): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch@173807 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog14
-rw-r--r--gcc/config/i386/constraints.md2
-rw-r--r--gcc/config/i386/i386.c2
-rw-r--r--gcc/config/i386/i386.md19
4 files changed, 26 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 801e34ed4a9..c23602c9544 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,17 @@
+2011-05-16 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.md (*movxf_internal): Disable CONST_DOUBLE
+ optimization for CM_MEDIUM and CM_LARGE code models. Fix usage
+ of standard_80387_constant_p.
+ (*movxf_internal_nointeger): Ditto.
+ (*movdf_internal): Remove dead code-size optimization.
+ (*movdf_internal_rex64): Fix usage of standard_80387_constant_p.
+ (*movdf_internal_nointeger): Ditto.
+ (*movsf_internal): Ditto.
+ (floating point move splitters): Ditto.
+ * config/i386/constraints.md (G): Ditto.
+ * config/i386/i386.c (ix86_preferred_reload_class): Ditto.
+
2011-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
Backport from mainline
diff --git a/gcc/config/i386/constraints.md b/gcc/config/i386/constraints.md
index 89722bb92da..4bc3ed64b02 100644
--- a/gcc/config/i386/constraints.md
+++ b/gcc/config/i386/constraints.md
@@ -149,7 +149,7 @@
(define_constraint "G"
"Standard 80387 floating point constant."
(and (match_code "const_double")
- (match_test "standard_80387_constant_p (op)")))
+ (match_test "standard_80387_constant_p (op) > 0")))
;; This can theoretically be any mode's CONST0_RTX.
(define_constraint "C"
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index ef35b3a0a8f..35e1ceeeddc 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -25071,7 +25071,7 @@ ix86_preferred_reload_class (rtx x, enum reg_class regclass)
zero above. We only want to wind up preferring 80387 registers if
we plan on doing computation with them. */
if (TARGET_80387
- && standard_80387_constant_p (x))
+ && standard_80387_constant_p (x) > 0)
{
/* Limit class to non-sse. */
if (regclass == FLOAT_SSE_REGS)
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 91e861192b8..1afa1e0da2a 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -2872,7 +2872,7 @@
&& (reload_in_progress || reload_completed
|| (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
|| (!TARGET_SSE_MATH && optimize_function_for_size_p (cfun)
- && standard_80387_constant_p (operands[1]))
+ && standard_80387_constant_p (operands[1]) > 0)
|| GET_CODE (operands[1]) != CONST_DOUBLE
|| memory_operand (operands[0], SFmode))"
{
@@ -3043,11 +3043,10 @@
|| (!(TARGET_SSE2 && TARGET_SSE_MATH)
&& optimize_function_for_size_p (cfun)
&& !memory_operand (operands[0], DFmode)
- && standard_80387_constant_p (operands[1]))
+ && standard_80387_constant_p (operands[1]) > 0)
|| GET_CODE (operands[1]) != CONST_DOUBLE
|| ((optimize_function_for_size_p (cfun)
- || !TARGET_MEMORY_MISMATCH_STALL
- || reload_in_progress || reload_completed)
+ || !TARGET_MEMORY_MISMATCH_STALL)
&& memory_operand (operands[0], DFmode)))"
{
switch (which_alternative)
@@ -3196,7 +3195,7 @@
|| (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
|| (!(TARGET_SSE2 && TARGET_SSE_MATH)
&& optimize_function_for_size_p (cfun)
- && standard_80387_constant_p (operands[1]))
+ && standard_80387_constant_p (operands[1]) > 0)
|| GET_CODE (operands[1]) != CONST_DOUBLE
|| memory_operand (operands[0], DFmode))"
{
@@ -3337,7 +3336,7 @@
|| (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
|| (!(TARGET_SSE2 && TARGET_SSE_MATH)
&& optimize_function_for_size_p (cfun)
- && standard_80387_constant_p (operands[1]))
+ && standard_80387_constant_p (operands[1]) > 0)
|| GET_CODE (operands[1]) != CONST_DOUBLE
|| memory_operand (operands[0], DFmode))"
{
@@ -3568,7 +3567,8 @@
"optimize_function_for_size_p (cfun)
&& !(MEM_P (operands[0]) && MEM_P (operands[1]))
&& (reload_in_progress || reload_completed
- || standard_80387_constant_p (operands[1])
+ || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
+ || standard_80387_constant_p (operands[1]) > 0
|| GET_CODE (operands[1]) != CONST_DOUBLE
|| memory_operand (operands[0], XFmode))"
{
@@ -3596,6 +3596,7 @@
"optimize_function_for_speed_p (cfun)
&& !(MEM_P (operands[0]) && MEM_P (operands[1]))
&& (reload_in_progress || reload_completed
+ || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
|| GET_CODE (operands[1]) != CONST_DOUBLE
|| memory_operand (operands[0], XFmode))"
{
@@ -3740,7 +3741,7 @@
}
else if (FP_REG_P (r))
{
- if (!standard_80387_constant_p (c))
+ if (standard_80387_constant_p (c) < 1)
FAIL;
}
else if (MMX_REG_P (r))
@@ -3772,7 +3773,7 @@
}
else if (FP_REG_P (r))
{
- if (!standard_80387_constant_p (c))
+ if (standard_80387_constant_p (c) < 1)
FAIL;
}
else if (MMX_REG_P (r))