|
|
| IntegerValue (const IntegerValue &) |
|
| IntegerValue (IntegerValue &&) |
|
IntegerValue & | operator= (const IntegerValue &) |
|
IntegerValue & | operator= (IntegerValue &&) |
|
| IntegerValue (int kind, const IntegerValue &x) |
|
| IntegerValue (int kind, IntegerValue &&x) |
|
template<typename INT, typename = std::enable_if_t<common::numeric_limits<INT>::is_integer>> |
| | IntegerValue (int kind, INT v) |
|
void | print (llvm::raw_ostream &os) const |
|
LLVM_DUMP_METHOD void | dump () const |
| bool | IsNull () const |
|
int | kind () const |
| | The kind of the value currently stored.
|
|
int | bits () const |
|
std::size_t | bytesStored () const |
| | Number of bytes accessed by FromRawBytes/StoreRawBytes.
|
|
bool | operator< (const IntegerValue &y) const |
|
bool | operator<= (const IntegerValue &y) const |
|
bool | operator== (const IntegerValue &y) const |
|
bool | operator!= (const IntegerValue &y) const |
|
bool | operator>= (const IntegerValue &y) const |
|
bool | operator> (const IntegerValue &y) const |
|
std::string | UnsignedDecimal () const |
|
std::string | SignedDecimal () const |
|
std::string | Hexadecimal () const |
| | Omits a leading "0x".
|
|
bool | IsZero () const |
|
bool | IsNegative () const |
|
Ordering | CompareToZeroSigned () const |
| int | LEADZ () const |
|
int | POPCNT () const |
| | Count the number of bit positions that are set.
|
|
bool | POPPAR () const |
| | True when POPCNT is odd.
|
|
int | TRAILZ () const |
|
bool | BTEST (int pos) const |
|
Ordering | CompareUnsigned (const IntegerValue &y) const |
|
Ordering | CompareSigned (const IntegerValue &y) const |
|
bool | BGE (const IntegerValue &y) const |
|
bool | BGT (const IntegerValue &y) const |
|
bool | BLE (const IntegerValue &y) const |
|
bool | BLT (const IntegerValue &y) const |
|
std::uint64_t | ToUInt64 () const |
|
std::int64_t | ToInt64 () const |
|
Fortran::common::uint128_t | ToUInt128 () const |
|
Fortran::common::int128_t | ToInt128 () const |
|
template<typename INT, typename = std::enable_if_t<std::is_signed_v<INT> || std::is_same_v<INT, Fortran::common::int128_t>>> |
| INT | ToSInt () const |
|
template<typename INT, typename = std::enable_if_t<std::is_unsigned_v<INT> || std::is_same_v<INT, Fortran::common::uint128_t>>> |
| INT | ToUInt () const |
|
IntegerValue | NOT () const |
| | Ones'-complement (i.e., C's ~)
|
| ValueWithOverflow | Negate () const |
|
ValueWithOverflow | ABS () const |
| IntegerValue | ISHFT (int count) const |
|
IntegerValue | SHIFTL (int count) const |
| | Left shift with zero fill.
|
| IntegerValue | ISHFTC (int count, int size) const |
|
IntegerValue | ISHFTC (int count) const |
|
IntegerValue | DSHIFTL (const IntegerValue &fill, int count) const |
| | DSHIFTL(I,J) shifts I:J left; the second argument is the right fill.
|
|
IntegerValue | DSHIFTR (const IntegerValue &v2, int count) const |
| | DSHIFTR(I,J) shifts I:J right; the first argument is the left fill.
|
|
IntegerValue | SHIFTR (int count) const |
| | Vacated upper bits are filled with zeroes.
|
| IntegerValue | SHIFTA (int count) const |
|
IntegerValue | IBCLR (int pos) const |
| | Clears a single bit.
|
|
IntegerValue | IBSET (int pos) const |
| | Sets a single bit.
|
|
IntegerValue | IBITS (int pos, int size) const |
| | Extracts a field.
|
|
IntegerValue | IAND (const IntegerValue &y) const |
|
IntegerValue | IOR (const IntegerValue &y) const |
|
IntegerValue | IEOR (const IntegerValue &y) const |
|
IntegerValue | MERGE_BITS (const IntegerValue &y, const IntegerValue &mask) const |
|
IntegerValue | MAX (const IntegerValue &y) const |
|
IntegerValue | MIN (const IntegerValue &y) const |
|
ValueWithCarry | AddUnsigned (const IntegerValue &y, bool carryIn=false) const |
|
ValueWithOverflow | AddSigned (const IntegerValue &y) const |
|
ValueWithOverflow | SubtractSigned (const IntegerValue &y) const |
|
ValueWithOverflow | DIM (const IntegerValue &y) const |
| | DIM(X,Y)=MAX(X-Y, 0)
|
|
ValueWithOverflow | SIGN (const IntegerValue &sign) const |
|
Product | MultiplyUnsigned (const IntegerValue &y) const |
|
Product | MultiplySigned (const IntegerValue &y) const |
|
QuotientWithRemainder | DivideUnsigned (const IntegerValue &y) const |
| QuotientWithRemainder | DivideSigned (const IntegerValue &y) const |
| ValueWithOverflow | MODULO (const IntegerValue &y) const |
|
PowerWithErrors | Power (const IntegerValue &e) const |
|
void | StoreRawBytes (void *dst, size_t size, bool *changed=nullptr) const |
|
| static IntegerValue | Zero (int kind) |
|
static constexpr int | bits (int kind) |
|
static constexpr std::size_t | bytesStored (int kind) |
|
static IntegerValue | MASKL (int kind, int places) |
| | Left-justified mask (e.g., MASKL(1) has only its sign bit set)
|
|
static IntegerValue | MASKR (int kind, int places) |
| | Right-justified mask (e.g., MASKR(1) == 1, MASKR(2) == 3, &c.)
|
|
static ValueWithOverflow | Read (int kind, const char *&pp, int base, bool isSigned) |
|
static ValueWithOverflow | ConvertUnsigned (int toKind, const IntegerValue &from) |
| | ZExt or Trunc.
|
|
static ValueWithOverflow | ConvertSigned (int toKind, const IntegerValue &from) |
| | SExt or Trunc.
|
|
static constexpr int | DIGITS (int kind) |
|
static IntegerValue | HUGE (int kind) |
|
static IntegerValue | Least (int kind) |
|
static int | RANGE (int kind) |
|
static int | UnsignedRANGE (int kind) |
|
static IntegerValue | FromRawBytes (int kind, const void *raw, std::size_t expectedSize) |
A two's-complement integer with dynamic bitwidth.
The bitwidth is dynamic, but only a predefined set of Fortran kinds are allowed. It is also kind-aware, i.e. knows which INTEGER kind it currently represents.
The implementation is hidden from this header using a pImpl-like idiom.