OSDN Git Service

* config/rs6000/rs6000.md (floatsitf2): Use expand_float rather
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Jan 2004 21:03:06 +0000 (21:03 +0000)
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Jan 2004 21:03:06 +0000 (21:03 +0000)
than trying to generate RTL directly.
(fix_trunctfsi2): Use expand_fix rather than trying to generate
RTL directly.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75485 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/rs6000/rs6000.md

index 502d65b..6265cbe 100644 (file)
@@ -1,5 +1,10 @@
 2004-01-06  Geoffrey Keating  <geoffk@apple.com>
 
+       * config/rs6000/rs6000.md (floatsitf2): Use expand_float rather
+       than trying to generate RTL directly.
+       (fix_trunctfsi2): Use expand_fix rather than trying to generate
+       RTL directly.
+
        * dwarf2out.c (add_const_value_attribute): Remove incorrect comment.
 
 2004-01-06  David Edelsohn  <edelsohn@gnu.org>
index 602eaba..273aec6 100644 (file)
        (float_extend:TF (match_dup 2)))]
   "")
 
-(define_insn_and_split "floatsitf2"
+(define_expand "floatsitf2"
   [(set (match_operand:TF 0 "gpc_reg_operand" "=f")
-        (float:TF (match_operand:SI 1 "gpc_reg_operand" "r")))
-   (clobber (match_scratch:DF 2 "=f"))]
+        (float:TF (match_operand:SI 1 "gpc_reg_operand" "r")))]
   "(DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN)
    && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128"
-  "#"
-  "&& reload_completed"
-  [(set (match_dup 2)
-       (float:DF (match_dup 1)))
-   (set (match_dup 0)
-       (float_extend:TF (match_dup 2)))]
-  "")
+{
+  rtx tmp = gen_reg_rtx (DFmode);
+  expand_float (tmp, operands[1], false);
+  emit_insn (gen_extenddftf2 (operands[0], tmp));
+  DONE;
+})
 
 (define_insn_and_split "fix_trunctfdi2"
   [(set (match_operand:DI 0 "gpc_reg_operand" "=*f")
        (fix:DI (match_dup 2)))]
   "")
 
-(define_insn_and_split "fix_trunctfsi2"
+(define_expand "fix_trunctfsi2"
   [(set (match_operand:SI 0 "gpc_reg_operand" "=r")
-        (fix:SI (match_operand:TF 1 "gpc_reg_operand" "f")))
-   (clobber (match_scratch:DF 2 "=f"))]
+        (fix:SI (match_operand:TF 1 "gpc_reg_operand" "f")))]
   "(DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN)
    && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128"
-  "#"
-  "&& reload_completed"
-  [(set (match_dup 2)
-       (float_truncate:DF (match_dup 1)))
-   (set (match_dup 0)
-       (fix:SI (match_dup 2)))]
-  "")
+{
+  rtx tmp = gen_reg_rtx (DFmode);
+  emit_insn (gen_trunctfdf2 (tmp, operands[1]));
+  expand_fix (operands[0], tmp, false);
+  DONE;
+})
 
 (define_insn "negtf2"
   [(set (match_operand:TF 0 "gpc_reg_operand" "=f")