diff options
author | Richard Biener <rguenth@gcc.gnu.org> | 2010-07-05 13:06:07 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-07-05 13:06:07 +0000 |
commit | bdc453866cbd815b1d62d858272b8a40f8fdc9fa (patch) | |
tree | 04c9b9fa1818c750489682948c3f7dda525bc7e4 /gcc/double-int.c | |
parent | 989ea525bec01e16c29b69bf5194310c551d9c34 (diff) | |
download | gcc-bdc453866cbd815b1d62d858272b8a40f8fdc9fa.tar.gz |
double-int.h (double_int_sub): Declare.
2010-07-05 Richard Guenther <rguenther@suse.de>
* double-int.h (double_int_sub): Declare.
* double-int.c (double_int_sub): New function.
* dwarf2out.c (field_byte_offset): Use it.
* fixed-value.c (do_fixed_add): Likewise.
(do_fixed_multiply): Likewise.
(do_fixed_divide): Likewise.
* tree-predcom.c (add_ref_to_chain): Likewise.
(determine_roots_comp): Likewise.
* tree-ssa-loop-niter.c (derive_constant_upper_bound_ops): Likewise.
From-SVN: r161835
Diffstat (limited to 'gcc/double-int.c')
-rw-r--r-- | gcc/double-int.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/double-int.c b/gcc/double-int.c index aa175e89d41..0bfe514238d 100644 --- a/gcc/double-int.c +++ b/gcc/double-int.c @@ -792,6 +792,17 @@ double_int_add (double_int a, double_int b) return ret; } +/* Returns A - B. */ + +double_int +double_int_sub (double_int a, double_int b) +{ + double_int ret; + neg_double (b.low, b.high, &b.low, &b.high); + add_double (a.low, a.high, b.low, b.high, &ret.low, &ret.high); + return ret; +} + /* Returns -A. */ double_int |