![]() |
PandA-2024.02
|
#include <APInt.hpp>
Public Types | |
| using | backend = boost::multiprecision::backends::cpp_int_backend< 4096, 4096, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void > |
| using | number = boost::multiprecision::number< backend > |
| using | bw_t = uint16_t |
Public Member Functions | |
| APInt () | |
| template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value>::type> | |
| APInt (T val) | |
| APInt (const number &v) | |
| APInt (const std::string &str) | |
| operator bool () const | |
| APInt & | operator+= (const APInt &rhs) |
| APInt & | operator-= (const APInt &rhs) |
| APInt & | operator*= (const APInt &rhs) |
| APInt & | operator/= (const APInt &rhs) |
| APInt & | operator%= (const APInt &rhs) |
| APInt & | operator &= (const APInt &rhs) |
| APInt & | operator|= (const APInt &rhs) |
| APInt & | operator^= (const APInt &rhs) |
| APInt & | operator<<= (const APInt &rhs) |
| APInt & | operator>>= (const APInt &rhs) |
| APInt | abs () const |
| APInt | operator- () const |
| APInt | operator~ () const |
| APInt | operator++ (int) |
| APInt | operator-- (int) |
| APInt & | operator++ () |
| APInt & | operator-- () |
| void | bit_set (bw_t i) |
| void | bit_clr (bw_t i) |
| bool | bit_tst (bw_t i) const |
| bool | sign () const |
| APInt & | extOrTrunc (bw_t bw, bool sign) |
| APInt | extOrTrunc (bw_t bw, bool sign) const |
| bw_t | trailingZeros (bw_t bw) const |
| bw_t | trailingOnes (bw_t bw) const |
| bw_t | leadingZeros (bw_t bw) const |
| bw_t | leadingOnes (bw_t bw) const |
| bw_t | minBitwidth (bool sign) const |
| template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type> | |
| operator T () const | |
Static Public Member Functions | |
| static APInt | getMaxValue (bw_t bw) |
| static APInt | getMinValue (bw_t bw) |
| static APInt | getSignedMaxValue (bw_t bw) |
| static APInt | getSignedMinValue (bw_t bw) |
Private Attributes | |
| number | _data |
Friends | |
| bool | operator< (const APInt &lhs, const APInt &rhs) |
| bool | operator> (const APInt &lhs, const APInt &rhs) |
| bool | operator<= (const APInt &lhs, const APInt &rhs) |
| bool | operator>= (const APInt &lhs, const APInt &rhs) |
| bool | operator== (const APInt &lhs, const APInt &rhs) |
| bool | operator!= (const APInt &lhs, const APInt &rhs) |
| APInt | operator+ (const APInt &lhs, const APInt &rhs) |
| APInt | operator- (const APInt &lhs, const APInt &rhs) |
| APInt | operator* (const APInt &lhs, const APInt &rhs) |
| APInt | operator/ (const APInt &lhs, const APInt &rhs) |
| APInt | operator% (const APInt &lhs, const APInt &rhs) |
| APInt | operator & (const APInt &lhs, const APInt &rhs) |
| APInt | operator| (const APInt &lhs, const APInt &rhs) |
| APInt | operator^ (const APInt &lhs, const APInt &rhs) |
| APInt | operator<< (const APInt &lhs, const APInt &rhs) |
| APInt | operator>> (const APInt &lhs, const APInt &rhs) |
| std::ostream & | operator<< (std::ostream &str, const APInt &v) |
| std::istream & | operator>> (std::istream &str, APInt &v) |
| using APInt::backend = boost::multiprecision::backends::cpp_int_backend<4096, 4096, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void> |
| using APInt::bw_t = uint16_t |
| using APInt::number = boost::multiprecision::number<backend> |
| APInt::APInt | ( | ) |
Definition at line 54 of file APInt.cpp.
Referenced by extOrTrunc(), getMaxValue(), getMinValue(), getSignedMaxValue(), getSignedMinValue(), minBitwidth(), operator &(), operator%(), operator*(), operator+(), operator-(), operator/(), operator<<(), operator>>(), operator^(), and operator|().

|
inline |
|
inline |
Definition at line 78 of file APInt.hpp.
References abs(), bit_clr(), bit_set(), bit_tst(), extOrTrunc(), leadingOnes(), leadingZeros(), minBitwidth(), operator &, operator &=(), operator!=, operator%, operator%=(), operator*, operator*=(), operator+, operator++(), operator+=(), operator-(), operator--(), operator-=(), operator/, operator/=(), operator<, operator<<, operator<<=(), operator<=, operator==, operator>, operator>=, operator>>, operator>>=(), operator^, operator^=(), operator|, operator|=(), operator~(), sign(), trailingOnes(), trailingZeros(), test_panda::type, and symmetry::value.

| APInt APInt::abs | ( | ) | const |
| void APInt::bit_clr | ( | bw_t | i | ) |
| void APInt::bit_set | ( | bw_t | i | ) |
Definition at line 265 of file APInt.cpp.
References _data.
Referenced by APInt(), extOrTrunc(), leadingOnes(), trailingOnes(), and trailingZeros().

Definition at line 285 of file APInt.cpp.
References _data, bit_tst(), THROW_ASSERT, and U.
Referenced by APInt(), Range::fromBitValues(), Range::getUnsignedMax(), Range::getUnsignedMin(), Range::normalizeRange(), and Range::shl().


Definition at line 419 of file APInt.cpp.
References APInt().
Referenced by Range::getSpan(), Range::getUnsignedMax(), Range::makeSatisfyingCmpRegion(), Range::normalizeRange(), operator T(), RealRange::toFloat32(), Range::truncate(), Range::usat_add(), Range::usat_sub(), and Range::zextOrTrunc().


Definition at line 424 of file APInt.cpp.
References APInt().
Referenced by Range::getUnsignedMin(), Range::makeSatisfyingCmpRegion(), and operator T().


Definition at line 429 of file APInt.cpp.
References APInt().
Referenced by Range::abs(), Range::getSignedMax(), Range::getSpan(), Range::isFullSet(), Range::makeSatisfyingCmpRegion(), Range::normalizeRange(), operator T(), Range::sat_add(), Range::sat_sub(), SymbRange::solveFuture(), and Range::sub().


Definition at line 434 of file APInt.cpp.
References APInt().
Referenced by Range::abs(), Range::getSignedMin(), Range::getSpan(), Range::isFullSet(), Range::makeSatisfyingCmpRegion(), Range::normalizeRange(), operator T(), Range::sat_add(), Range::sat_sub(), SymbRange::solveFuture(), and Range::sub().


Definition at line 335 of file APInt.cpp.
References _data, offset, THROW_ASSERT, and THROW_ERROR.
Referenced by APInt(), and minBitwidth().

| APInt::bw_t APInt::minBitwidth | ( | bool | sign | ) | const |
Definition at line 395 of file APInt.cpp.
References _data, APInt(), leadingZeros(), sign(), and U.
Referenced by APInt(), Range::neededBits(), and tree_helper::Size().


|
inlineexplicit |
Definition at line 142 of file APInt.hpp.
References getMaxValue(), getMinValue(), getSignedMaxValue(), getSignedMinValue(), max, operator<<, operator>>, str, STR, test_panda::type, and U.

Definition at line 171 of file APInt.cpp.
References _data, and operator &=().
Referenced by APInt().


| APInt & APInt::operator++ | ( | ) |
Definition at line 245 of file APInt.cpp.
References operator+=().
Referenced by APInt().


Definition at line 147 of file APInt.cpp.
References _data.
Referenced by APInt(), and operator++().

| APInt APInt::operator- | ( | ) | const |
| APInt & APInt::operator-- | ( | ) |
Definition at line 250 of file APInt.cpp.
References operator-=().
Referenced by APInt().


Definition at line 153 of file APInt.cpp.
References _data.
Referenced by APInt(), and operator--().

| APInt APInt::operator~ | ( | ) | const |
| bool APInt::sign | ( | ) | const |
Definition at line 270 of file APInt.cpp.
References _data.
Referenced by APInt(), and minBitwidth().

Definition at line 137 of file APInt.cpp.
Referenced by APInt(), and operator T().
|
friend |
Definition at line 142 of file APInt.cpp.
Referenced by APInt(), and operator T().
|
friend |
|
private |
Definition at line 62 of file APInt.hpp.
Referenced by abs(), bit_clr(), bit_set(), bit_tst(), extOrTrunc(), leadingZeros(), minBitwidth(), operator bool(), operator!=(), operator%=(), operator*=(), operator++(), operator+=(), operator-(), operator--(), operator-=(), operator/=(), operator<(), operator<<(), operator<<=(), operator<=(), operator==(), operator>(), operator>=(), operator>>(), operator>>=(), operator^=(), operator|=(), operator~(), and sign().
1.8.13