diff options
author | Steven Bosscher <steven@gcc.gnu.org> | 2010-05-21 18:13:54 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2010-05-21 18:13:54 +0000 |
commit | d49b6e1e33707adeb972ade7cec09acc0b178d02 (patch) | |
tree | d44cc1a6330da7188cdd65b1bfce6a8b5b0818dc /gcc/realmpfr.h | |
parent | 759149fbf3c844c39b283e487190eed9377b594e (diff) | |
download | gcc-d49b6e1e33707adeb972ade7cec09acc0b178d02.zip gcc-d49b6e1e33707adeb972ade7cec09acc0b178d02.tar.gz gcc-d49b6e1e33707adeb972ade7cec09acc0b178d02.tar.bz2 |
real: Do not include gmp.h, mpfr.h, and mpc.h.
gcc/ChangeLog:
* real: Do not include gmp.h, mpfr.h, and mpc.h.
(REAL_VALUE_NEGATE, REAL_VALUE_ABS, real_arithmetic2): Remove.
(real_value_negate, real_value_abs): New prototypes.
(do_mpc_arg2, real_from_mpfr, mpfr_from_real): Move from here...
* realmpfr.h (do_mpc_arg2, real_from_mpfr, mpfr_from_real): ...to here,
new include file for interface between MPFR and REAL_VALUE_TYPE.
* real.c: Include realmpfr.h.
(real_arithmetic2): Remove legacy function.
(real_value_negate): New.
(real_value_abs): New.
(mfpr_from_real, real_from_mpfr): Move from here...
* realmpfr.c (mpfr_from_real, real_from_mpfr): ...to here, new file.
* builtins.c: Include realmpfr.h.
* fold-const.c: Include realmpfr.h.
(fold_comparison): Use real_value_negate instead of REAL_VALUE_NEGATE.
(fold_negate_const): Likewise.
(fold_abs_const): Use real_value_abs instead of REAL_VALUE_ABS.
* toplev.c: Include realmpfr.h.
* simplify-rtx.c (simplify_const_unary_operation): Use real_value_abs
and real_value_negate.
* fixed-value.c (check_real_for_fixed_mode): Likewise.
* config/arm/arm.c (neg_const_double_rtx_ok_for_fpa): Likewise.
(vfp3_const_double_index): Likewise.
(arm_print_operand): Likewise.
* Makefile.in: Update dependencies.
fortran/ChangeLog:
* trans-const.c: Include realmpfr.h.
* Make-lang.in: Update dependencies.
From-SVN: r159679
Diffstat (limited to 'gcc/realmpfr.h')
-rw-r--r-- | gcc/realmpfr.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/gcc/realmpfr.h b/gcc/realmpfr.h new file mode 100644 index 0000000..ab234e9 --- /dev/null +++ b/gcc/realmpfr.h @@ -0,0 +1,40 @@ +/* Definitions of floating-point conversion from compiler + internal format to MPFR. + Copyright (C) 2010 + Free Software Foundation, Inc. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 3, or (at your option) any later + version. + + GCC is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING3. If not see + <http://www.gnu.org/licenses/>. */ + +#ifndef GCC_REALGMP_H +#define GCC_REALGMP_H + +#include <gmp.h> +#include <mpfr.h> +#include <mpc.h> +#include "real.h" + +/* In builtins.c. */ +extern tree do_mpc_arg2 (tree, tree, tree, int, int (*)(mpc_ptr, mpc_srcptr, mpc_srcptr, mpc_rnd_t)); + +/* Convert between MPFR and REAL_VALUE_TYPE. The caller is + responsible for initializing and clearing the MPFR parameter. */ + +extern void real_from_mpfr (REAL_VALUE_TYPE *, mpfr_srcptr, tree, mp_rnd_t); +extern void mpfr_from_real (mpfr_ptr, const REAL_VALUE_TYPE *, mp_rnd_t); + +#endif /* ! GCC_REALGMP_H */ + |