LLVM: lib/Support/APInt.cpp File Reference (original) (raw)

Go to the source code of this file.

Functions
static uint64_t * getClearedMemory (unsigned numWords)
A utility function for allocating memory, checking for allocation failures, and ensuring the contents are zeroed.
static uint64_t * getMemory (unsigned numWords)
A utility function for allocating memory and checking for allocation failure.
static unsigned getDigit (char cdigit, uint8_t radix)
A utility function that converts a character to a digit.
static void tcComplement (APInt::WordType *dst, unsigned parts)
static unsigned rotateModulo (unsigned BitWidth, const APInt &rotateAmt)
static void KnuthDiv (uint32_t *u, uint32_t *v, uint32_t *q, uint32_t *r, unsigned m, unsigned n)
Implementation of Knuth's Algorithm D (Division of nonnegative integers) from "Art of Computer Programming, Volume 2", section 4.3.1, p.
static APInt::WordType lowBitMask (unsigned bits)
static APInt::WordType lowHalf (APInt::WordType part)
Returns the value of the lower half of PART.
static APInt::WordType highHalf (APInt::WordType part)
Returns the value of the upper half of PART.

DEBUG_KNUTH

| #define DEBUG_KNUTH | ( | | X | ) | do {} while(false) | | -------------------- | - | | ------------------------------------------------------------------ | - | ------------------------------------------------------------------------------- |

DEBUG_TYPE

#define DEBUG_TYPE "apint"

getClearedMemory()

A utility function for allocating memory, checking for allocation failures, and ensuring the contents are zeroed.

Definition at line 36 of file APInt.cpp.

getDigit()

A utility function that converts a character to a digit.

Definition at line 47 of file APInt.cpp.

getMemory()

highHalf()

KnuthDiv()

Implementation of Knuth's Algorithm D (Division of nonnegative integers) from "Art of Computer Programming, Volume 2", section 4.3.1, p.

  1. The variables here have the same names as in the algorithm. Comments explain the algorithm and any deviation from it.

Definition at line 1264 of file APInt.cpp.

References assert(), llvm::countl_zero(), llvm::dbgs(), DEBUG_KNUTH, llvm::Hi_32(), isNeg(), llvm::Lo_32(), and llvm::Make_64().

lowBitMask()

lowHalf()

rotateModulo()

tcComplement()