From 0c90aa3c5cc34d1f67cdc3a8089c0a22c93d3648 Mon Sep 17 00:00:00 2001 From: Geoffrey Keating Date: Tue, 6 Jan 2004 21:03:06 +0000 Subject: [PATCH] rs6000.md (floatsitf2): Use expand_float rather than trying to generate RTL directly. * 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. From-SVN: r75485 --- gcc/ChangeLog | 5 +++++ gcc/config/rs6000/rs6000.md | 36 ++++++++++++++++-------------------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 502d65be27b..6265cbeb901 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2004-01-06 Geoffrey Keating + * 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 diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 602eabaf852..273aec6878e 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -8290,19 +8290,17 @@ (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") @@ -8319,19 +8317,17 @@ (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") -- 2.30.2