diff options
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 |