Commit 330db1e3 by Richard Guenther Committed by Richard Biener

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
parent 0b3467c4
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.
2010-04-15 Bernd Schmidt <bernd.schmidt@codesourcery.com>
PR target/43742
......
......@@ -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. */
......
......@@ -4820,44 +4820,6 @@ extern void fold_undefer_overflow_warnings (bool, const_gimple, int);
extern void fold_undefer_and_ignore_overflow_warnings (void);
extern bool fold_deferring_overflow_warnings_p (void);
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 (enum tree_code, 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 *);
enum operand_equal_flag
{
OEP_ONLY_CONST = 1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment