aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edelsohn <edelsohn@gnu.org>2005-02-14 20:21:10 +0000
committerDavid Edelsohn <dje@gcc.gnu.org>2005-02-14 15:21:10 -0500
commit8cb320b856252c5dc5da29f3d7c27ec4bcf2c5c4 (patch)
treecc034047cdc8b87b8fa81229fd72e85b1a76a314
parentadfec6a67bf360ba3698d732cce1a731692b578c (diff)
downloadgcc-8cb320b856252c5dc5da29f3d7c27ec4bcf2c5c4.zip
gcc-8cb320b856252c5dc5da29f3d7c27ec4bcf2c5c4.tar.gz
gcc-8cb320b856252c5dc5da29f3d7c27ec4bcf2c5c4.tar.bz2
re PR target/19019 (GCC ldouble format incompatibility with XLC long double)
PR target/19019 * config/rs6000/rs6000.md (trunctfdf2): Change to define_expand. (trunctfdf2_internal1): New. (trunctfdf2_internal2): Renamed from trunctfdf2. From-SVN: r95042
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/rs6000/rs6000.md28
2 files changed, 32 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e20036f..0ec0e84 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 515bb05..3fdb165 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -8325,14 +8325,36 @@
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")