diff options
author | Richard Guenther <rguenther@suse.de> | 2010-04-15 12:45:58 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-04-15 12:45:58 +0000 |
commit | 330db1e301250f2b81a1dc79a8c07b2d9e7dfc29 (patch) | |
tree | ef22bf965c36b317d7e9ce2473fb42ef161f830d /gcc/double-int.h | |
parent | 0b3467c4a3424bc3b960336dd87160db7a481f99 (diff) | |
download | gcc-330db1e301250f2b81a1dc79a8c07b2d9e7dfc29.zip gcc-330db1e301250f2b81a1dc79a8c07b2d9e7dfc29.tar.gz gcc-330db1e301250f2b81a1dc79a8c07b2d9e7dfc29.tar.bz2 |
fold-const.c (LOWPART, [...]): Move ...
2010-04-15 Richard Guenther <rguenther@suse.de>
* fold-const.c (LOWPART, HIGHPART, BASE, encode, decode,
fit_double_type, force_fit_type_double, add_double_with_sign,
neg_double, mul_double_with_sign, lshift_double, rshift_double,
lrotate_double, rrotate_double, div_and_round_double): Move ...
* double-int.c: ... here.
* tree.h (force_fit_type_double, fit_double_type, add_double_with_sign,
add_double, neg_double, mul_double_with_sign, mul_double,
lshift_double, rshift_double, lrotate_double, rrotate_double,
div_and_round_double): Move prototypes ...
* double-int.h: ... here.
From-SVN: r158372
Diffstat (limited to 'gcc/double-int.h')
-rw-r--r-- | gcc/double-int.h | 49 |
1 files changed, 44 insertions, 5 deletions
diff --git a/gcc/double-int.h b/gcc/double-int.h index 30e32fc..64ac843 100644 --- a/gcc/double-int.h +++ b/gcc/double-int.h @@ -59,13 +59,11 @@ typedef struct #define HOST_BITS_PER_DOUBLE_INT (2 * HOST_BITS_PER_WIDE_INT) -union tree_node; - /* Constructors and conversions. */ -union tree_node *double_int_to_tree (union tree_node *, double_int); -bool double_int_fits_to_tree_p (const union tree_node *, double_int); -double_int tree_to_double_int (const union tree_node *); +tree double_int_to_tree (tree, double_int); +bool double_int_fits_to_tree_p (const_tree, double_int); +double_int tree_to_double_int (const_tree); /* Constructs double_int from integer CST. The bits over the precision of HOST_WIDE_INT are filled with the sign bit. */ @@ -202,6 +200,47 @@ double_int_equal_p (double_int cst1, double_int cst2) return cst1.low == cst2.low && cst1.high == cst2.high; } + +/* Legacy interface with decomposed high/low parts. */ + +extern tree force_fit_type_double (tree, unsigned HOST_WIDE_INT, HOST_WIDE_INT, + int, bool); +extern int fit_double_type (unsigned HOST_WIDE_INT, HOST_WIDE_INT, + unsigned HOST_WIDE_INT *, HOST_WIDE_INT *, + const_tree); +extern int add_double_with_sign (unsigned HOST_WIDE_INT, HOST_WIDE_INT, + unsigned HOST_WIDE_INT, HOST_WIDE_INT, + unsigned HOST_WIDE_INT *, HOST_WIDE_INT *, + bool); +#define add_double(l1,h1,l2,h2,lv,hv) \ + add_double_with_sign (l1, h1, l2, h2, lv, hv, false) +extern int neg_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT, + unsigned HOST_WIDE_INT *, HOST_WIDE_INT *); +extern int mul_double_with_sign (unsigned HOST_WIDE_INT, HOST_WIDE_INT, + unsigned HOST_WIDE_INT, HOST_WIDE_INT, + unsigned HOST_WIDE_INT *, HOST_WIDE_INT *, + bool); +#define mul_double(l1,h1,l2,h2,lv,hv) \ + mul_double_with_sign (l1, h1, l2, h2, lv, hv, false) +extern void lshift_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT, + HOST_WIDE_INT, unsigned int, + unsigned HOST_WIDE_INT *, HOST_WIDE_INT *, bool); +extern void rshift_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT, + HOST_WIDE_INT, unsigned int, + unsigned HOST_WIDE_INT *, HOST_WIDE_INT *, bool); +extern void lrotate_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT, + HOST_WIDE_INT, unsigned int, + unsigned HOST_WIDE_INT *, HOST_WIDE_INT *); +extern void rrotate_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT, + HOST_WIDE_INT, unsigned int, + unsigned HOST_WIDE_INT *, HOST_WIDE_INT *); +extern int div_and_round_double (unsigned, int, unsigned HOST_WIDE_INT, + HOST_WIDE_INT, unsigned HOST_WIDE_INT, + HOST_WIDE_INT, unsigned HOST_WIDE_INT *, + HOST_WIDE_INT *, unsigned HOST_WIDE_INT *, + HOST_WIDE_INT *); + + #ifndef GENERATOR_FILE /* Conversion to and from GMP integer representations. */ |