aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2007-03-22 15:59:10 +0100
committerUros Bizjak <uros@gcc.gnu.org>2007-03-22 15:59:10 +0100
commit8766652c6e5781bf288ebbacf678fce26204d519 (patch)
treeeae52ad8b418217275d7cf8afea9a97fe3ee8b58 /gcc
parenta584cdf2537bc31624f29556324a52bf63ccd86c (diff)
downloadgcc-8766652c6e5781bf288ebbacf678fce26204d519.zip
gcc-8766652c6e5781bf288ebbacf678fce26204d519.tar.gz
gcc-8766652c6e5781bf288ebbacf678fce26204d519.tar.bz2
i386.md (cmp<mode>): Rename from cmpsf and cmpdf.
* config/i386/i386.md (cmp<mode>): Rename from cmpsf and cmpdf. Macroize expander using SSEMODEF mode macro. Use SSE_FLOAT_MODE_P. (*cmpfp_<mode>): Rename from *cmpfp_sf and *cmpfp_df. Macroize insn pattern using X87MODEF12 mode macro. From-SVN: r123128
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/i386/i386.md48
2 files changed, 20 insertions, 37 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 84cd544..f88b0ed 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2007-03-22 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.md (cmp<mode>): Rename from cmpsf and cmpdf.
+ Macroize expander using SSEMODEF mode macro. Use SSE_FLOAT_MODE_P.
+ (*cmpfp_<mode>): Rename from *cmpfp_sf and *cmpfp_df. Macroize
+ insn pattern using X87MODEF12 mode macro.
+
2007-03-21 Seongbae Park <seongbae.park@gmail.com>
* regmove.c (regmove_optimize): Use reg_mentioned_p
@@ -7,7 +14,7 @@
* c.opt: Fixup for Objective-C/C++.
-2007-02-21 Steve Ellcey <sje@cup.hp.com>
+2007-03-21 Steve Ellcey <sje@cup.hp.com>
* explow.c (convert_memory_address): Fold memory reference when
POINTERS_EXTEND_UNSIGNED < 0
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index df1bacf..fddd1c2 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -839,22 +839,11 @@
DONE;
})
-(define_expand "cmpdf"
+(define_expand "cmp<mode>"
[(set (reg:CC FLAGS_REG)
- (compare:CC (match_operand:DF 0 "cmp_fp_expander_operand" "")
- (match_operand:DF 1 "cmp_fp_expander_operand" "")))]
- "TARGET_80387 || (TARGET_SSE2 && TARGET_SSE_MATH)"
-{
- ix86_compare_op0 = operands[0];
- ix86_compare_op1 = operands[1];
- DONE;
-})
-
-(define_expand "cmpsf"
- [(set (reg:CC FLAGS_REG)
- (compare:CC (match_operand:SF 0 "cmp_fp_expander_operand" "")
- (match_operand:SF 1 "cmp_fp_expander_operand" "")))]
- "TARGET_80387 || TARGET_SSE_MATH"
+ (compare:CC (match_operand:SSEMODEF 0 "cmp_fp_expander_operand" "")
+ (match_operand:SSEMODEF 1 "cmp_fp_expander_operand" "")))]
+ "TARGET_80387 || (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)"
{
ix86_compare_op0 = operands[0];
ix86_compare_op1 = operands[1];
@@ -891,44 +880,31 @@
]
(const_string "XF")))])
-(define_insn "*cmpfp_sf"
- [(set (match_operand:HI 0 "register_operand" "=a")
- (unspec:HI
- [(compare:CCFP
- (match_operand:SF 1 "register_operand" "f")
- (match_operand:SF 2 "nonimmediate_operand" "fm"))]
- UNSPEC_FNSTSW))]
- "TARGET_80387"
- "* return output_fp_compare (insn, operands, 0, 0);"
- [(set_attr "type" "multi")
- (set_attr "unit" "i387")
- (set_attr "mode" "SF")])
-
-(define_insn "*cmpfp_df"
+(define_insn "*cmpfp_xf"
[(set (match_operand:HI 0 "register_operand" "=a")
(unspec:HI
[(compare:CCFP
- (match_operand:DF 1 "register_operand" "f")
- (match_operand:DF 2 "nonimmediate_operand" "fm"))]
+ (match_operand:XF 1 "register_operand" "f")
+ (match_operand:XF 2 "register_operand" "f"))]
UNSPEC_FNSTSW))]
"TARGET_80387"
"* return output_fp_compare (insn, operands, 0, 0);"
[(set_attr "type" "multi")
(set_attr "unit" "i387")
- (set_attr "mode" "DF")])
+ (set_attr "mode" "XF")])
-(define_insn "*cmpfp_xf"
+(define_insn "*cmpfp_<mode>"
[(set (match_operand:HI 0 "register_operand" "=a")
(unspec:HI
[(compare:CCFP
- (match_operand:XF 1 "register_operand" "f")
- (match_operand:XF 2 "register_operand" "f"))]
+ (match_operand:X87MODEF12 1 "register_operand" "f")
+ (match_operand:X87MODEF12 2 "nonimmediate_operand" "fm"))]
UNSPEC_FNSTSW))]
"TARGET_80387"
"* return output_fp_compare (insn, operands, 0, 0);"
[(set_attr "type" "multi")
(set_attr "unit" "i387")
- (set_attr "mode" "XF")])
+ (set_attr "mode" "<MODE>")])
(define_insn "*cmpfp_u"
[(set (match_operand:HI 0 "register_operand" "=a")