diff options
author | davidxl <davidxl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-09 02:01:06 +0000 |
---|---|---|
committer | davidxl <davidxl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-09 02:01:06 +0000 |
commit | 32c9de218a413cc6cede9ca61682e0a69b3f2e44 (patch) | |
tree | 77b19f0611ab2226e65c86445c21d58557e5a8ab /gcc/double-int.c | |
parent | 46bedd497ca733ae65b3e585d24456fede88410c (diff) | |
download | gcc-32c9de218a413cc6cede9ca61682e0a69b3f2e44.tar.gz |
Fix PR/46316
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166469 138bc75d-0d04-0410-961f-82ee72b054a4
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 |