diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-01 20:57:22 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-01 20:57:22 +0000 |
commit | 6eea7aff2a67ac5c8f25824560cbbc0b598d7a44 (patch) | |
tree | d73391b5971c6c088a383a03dc2be2def07a0bc7 /gcc/config/rs6000 | |
parent | 1e1a4c8c01aaeaeab9ebfb0dcf901542f968339c (diff) | |
download | gcc-6eea7aff2a67ac5c8f25824560cbbc0b598d7a44.tar.gz |
PR 19696
* optabs.c (expand_copysign_absneg): Export.
* optabs.h (expand_copysign_absneg): Declare.
* config/rs6000/rs6000.md (copysigntf3): New.
* gcc.c-torture/execute/ieee/copysign1.c: Special case sizeof
long double for ibm double-double format.
* gcc.c-torture/execute/ieee/copysign2.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94559 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000')
-rw-r--r-- | gcc/config/rs6000/rs6000.md | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 7ccdab8b5a8..c2dd678d767 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -8466,6 +8466,33 @@ operands[5] = simplify_gen_subreg (DFmode, operands[0], TFmode, hi_word); operands[6] = simplify_gen_subreg (DFmode, operands[0], TFmode, lo_word); }") + +(define_expand "copysigntf3" + [(match_operand:TF 0 "general_operand" "") + (match_operand:TF 1 "general_operand" "") + (match_operand:TF 2 "general_operand" "")] + "(DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN) + && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128" +{ + rtx target, op0, op1, temp; + bool op0_is_abs = false; + + target = operands[0]; + op0 = operands[1]; + op1 = operands[2]; + + if (GET_CODE (op0) == CONST_DOUBLE) + { + if (real_isneg (CONST_DOUBLE_REAL_VALUE (op0))) + op0 = simplify_unary_operation (ABS, TFmode, op0, TFmode); + op0_is_abs = true; + } + + temp = expand_copysign_absneg (TFmode, op0, op1, target, 127, op0_is_abs); + if (temp != target) + emit_move_insn (target, temp); + DONE; +}) ;; Next come the multi-word integer load and store and the load and store ;; multiple insns. |