]> gcc.gnu.org Git - gcc.git/commitdiff
re PR target/19019 (GCC ldouble format incompatibility with XLC long double)
authorDavid Edelsohn <edelsohn@gnu.org>
Mon, 14 Feb 2005 20:21:10 +0000 (20:21 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Mon, 14 Feb 2005 20:21:10 +0000 (15:21 -0500)
PR target/19019
* config/rs6000/rs6000.md (trunctfdf2): Change to define_expand.
(trunctfdf2_internal1): New.
(trunctfdf2_internal2): Renamed from trunctfdf2.

From-SVN: r95042

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

index e20036f273ab3e7efd9e8dcb62d4f9288af0542a..0ec0e849fa811bab27915a6218f3e952ba510859 100644 (file)
@@ -1,3 +1,10 @@
+2005-02-14  David Edelsohn  <edelsohn@gnu.org>
+
+       PR target/19019
+       * config/rs6000/rs6000.md (truntfdf2): Change to define_expand.
+       (trunctfdf2_internal1): New.
+       (trunctfdf2_internal2): XLC-compatible fadd version.
+
 2005-02-14  Diego Novillo  <dnovillo@redhat.com>
 
        PR tree-optimization/19853
index 515bb056cae89f4ebcc289fc1be7e6cf37b026f5..3fdb165dd41ceacb7ff6dfd30662db58a82f8ec2 100644 (file)
   DONE;
 })
 
-(define_insn "trunctfdf2"
+(define_expand "trunctfdf2"
   [(set (match_operand:DF 0 "gpc_reg_operand" "=f")
        (float_truncate:DF (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"
+"")
+
+(define_insn_and_split "trunctfdf2_internal1"
+  [(set (match_operand:DF 0 "gpc_reg_operand" "=f,?f")
+       (float_truncate:DF (match_operand:TF 1 "gpc_reg_operand" "0,f")))]
+  "(DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN) && !TARGET_XL_COMPAT
+   && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128"
+  "@
+   #
+   fmr %0,%1"
+  "&& reload_completed && REGNO (operands[0]) == REGNO (operands[1])"
+  [(const_int 0)]
+{
+  emit_note (NOTE_INSN_DELETED);
+  DONE;
+}
+  [(set_attr "type" "fp")])
+
+(define_insn "trunctfdf2_internal2"
+  [(set (match_operand:DF 0 "gpc_reg_operand" "=f")
+       (float_truncate:DF (match_operand:TF 1 "gpc_reg_operand" "f")))]
+  "(DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN) && TARGET_XL_COMPAT
+   && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128"
   "fadd %0,%1,%L1"
-  [(set_attr "type" "fp")
-   (set_attr "length" "4")])
+  [(set_attr "type" "fp")])
 
 (define_insn_and_split "trunctfsf2"
   [(set (match_operand:SF 0 "gpc_reg_operand" "=f")
This page took 0.077243 seconds and 5 git commands to generate.