mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
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
This commit is contained in:
@@ -1069,6 +1069,13 @@ public:
|
||||
/// Extract the given bit of a bignum; returns 0 or 1. Zero-based.
|
||||
static int tcExtractBit(const integerPart *, unsigned int bit);
|
||||
|
||||
/// Copy the bit vector of width srcBITS from SRC, starting at bit
|
||||
/// srcLSB, to DST, of dstCOUNT parts, such that the bit srcLSB
|
||||
/// becomes the least significant bit of DST. All high bits above
|
||||
/// srcBITS in DST are zero-filled.
|
||||
static void tcExtract(integerPart *, unsigned int dstCount, const integerPart *,
|
||||
unsigned int srcBits, unsigned int srcLSB);
|
||||
|
||||
/// Set the given bit of a bignum. Zero-based.
|
||||
static void tcSetBit(integerPart *, unsigned int bit);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user