Add a new function tcExtract for extracting a bignum from an
authorNeil Booth <neil@daikokuya.co.uk>
Mon, 8 Oct 2007 13:47:12 +0000 (13:47 +0000)
committerNeil Booth <neil@daikokuya.co.uk>
Mon, 8 Oct 2007 13:47:12 +0000 (13:47 +0000)
commit68e53ad6cb0a9d64d256f9dcef70331cd72d795e
tree4950f89a26f58ce497e0c332a4c1d2be75dc42a2
parent633360c9d9312cd159ab4ef98e918924a06cfdbd
Add a new function tcExtract for extracting a bignum from an
arbitrary range of bits embedded in the middle of another bignum.
This kind of operation is desirable in many cases of software
floating point, e.g. converting bignum integers to floating point
numbers of fixed precision (you want to extract the precision most
significant bits).

Elsewhere, add an assertion, and exit the shift functions early if
the shift count is zero.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42745 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/APInt.h
lib/Support/APInt.cpp