From b3a50850b16796a6bb2505cabf14571e1e13c656 Mon Sep 17 00:00:00 2001 From: Xinliang David Li Date: Tue, 9 Nov 2010 02:01:06 +0000 Subject: Fix PR/46316 From-SVN: r166469 --- gcc/double-int.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'gcc/double-int.c') diff --git a/gcc/double-int.c b/gcc/double-int.c index cb63f85..f3501a5 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 -- cgit v1.1