The POWER Toolchain IPC team who is adding POWER7 support to valgrind
reminded me that Power ISA 2.06 added a new convert from integer to
decimal64 dfp instruction.  The following patch adds support for it.

This passed bootstrap and regression testing with no regressions.
Is this ok?  If so, when can this be committed?  Now or stage1?

Peter

        * config/rs6000/dfp.md (floatdidd2): New define_insn.

Index: gcc/config/rs6000/dfp.md
===================================================================
--- gcc/config/rs6000/dfp.md    (revision 183808)
+++ gcc/config/rs6000/dfp.md    (working copy)
@@ -546,6 +546,13 @@ (define_insn "*cmptd_internal1"
   "dcmpuq %0,%1,%2"
   [(set_attr "type" "fpcompare")])
 
+(define_insn "floatdidd2"
+  [(set (match_operand:DD 0 "gpc_reg_operand" "=d")
+       (float:DD (match_operand:DI 1 "gpc_reg_operand" "d")))]
+  "TARGET_DFP && TARGET_POPCNTD"
+  "dcffix %0,%1"
+  [(set_attr "type" "fp")])
+
 (define_insn "floatditd2"
   [(set (match_operand:TD 0 "gpc_reg_operand" "=d")
        (float:TD (match_operand:DI 1 "gpc_reg_operand" "d")))]


Reply via email to