diff options
author | Neil Booth <neil@daikokuya.co.uk> | 2007-10-06 00:24:48 +0000 |
---|---|---|
committer | Neil Booth <neil@daikokuya.co.uk> | 2007-10-06 00:24:48 +0000 |
commit | 978661d05301a9bcd1222c048affef679da5ac43 (patch) | |
tree | 4a83b82f779dfebaa904148fec9cd9373df1dc11 /include/llvm/ADT/APInt.h | |
parent | 88cc699942f7f972ef9bc3afa1df0a44d059e1d8 (diff) | |
download | external_llvm-978661d05301a9bcd1222c048affef679da5ac43.zip external_llvm-978661d05301a9bcd1222c048affef679da5ac43.tar.gz external_llvm-978661d05301a9bcd1222c048affef679da5ac43.tar.bz2 |
Generalize tcFullMultiply so that the operands can be of differing
part widths. Also, return the number of parts actually required to
hold the result's value.
Remove an over-cautious condition from rounding of float->hex conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42669 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/APInt.h')
-rw-r--r-- | include/llvm/ADT/APInt.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/llvm/ADT/APInt.h b/include/llvm/ADT/APInt.h index 01b49d08..61e8f52 100644 --- a/include/llvm/ADT/APInt.h +++ b/include/llvm/ADT/APInt.h @@ -1114,10 +1114,12 @@ public: static int tcMultiply(integerPart *, const integerPart *, const integerPart *, unsigned); - /// DST = LHS * RHS, where DST has twice the width as the operands. - /// No overflow occurs. DST must be disjoint from both operands. - static void tcFullMultiply(integerPart *, const integerPart *, - const integerPart *, unsigned); + /// DST = LHS * RHS, where DST has width the sum of the widths of + /// the operands. No overflow occurs. DST must be disjoint from + /// both operands. Returns the number of parts required to hold the + /// result. + static unsigned int tcFullMultiply(integerPart *, const integerPart *, + const integerPart *, unsigned, unsigned); /// If RHS is zero LHS and REMAINDER are left unchanged, return one. /// Otherwise set LHS to LHS / RHS with the fractional part |