diff options
author | Xinliang David Li <davidxl@google.com> | 2010-11-09 02:01:06 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@gcc.gnu.org> | 2010-11-09 02:01:06 +0000 |
commit | b3a50850b16796a6bb2505cabf14571e1e13c656 (patch) | |
tree | 77b19f0611ab2226e65c86445c21d58557e5a8ab /gcc/double-int.c | |
parent | d5214afa121044b22e6c0b5c662f148f26c089d1 (diff) | |
download | gcc-b3a50850b16796a6bb2505cabf14571e1e13c656.tar.gz |
Fix PR/46316
From-SVN: r166469
Diffstat (limited to 'gcc/double-int.c')
-rw-r--r-- | gcc/double-int.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/double-int.c b/gcc/double-int.c index cb63f856df3..f3501a5c2c0 100644 --- a/gcc/double-int.c +++ b/gcc/double-int.c @@ -718,6 +718,19 @@ double_int_mul (double_int a, double_int b) return ret; } +/* Returns A * B. If the operation overflows according to UNSIGNED_P, + *OVERFLOW is set to nonzero. */ + +double_int +double_int_mul_with_sign (double_int a, double_int b, + bool unsigned_p, int *overflow) +{ + double_int ret; + *overflow = mul_double_with_sign (a.low, a.high, b.low, b.high, + &ret.low, &ret.high, unsigned_p); + return ret; +} + /* Returns A + B. */ double_int |