diff options
Diffstat (limited to 'src/literal.h')
-rw-r--r-- | src/literal.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/literal.h b/src/literal.h index 72bd36019..ae628149e 100644 --- a/src/literal.h +++ b/src/literal.h @@ -38,12 +38,6 @@ private: int64_t i64; }; - // The RHS of shl/shru/shrs must be masked by bitwidth. - template <typename T> - static T shiftMask(T val) { - return val & (sizeof(T) * 8 - 1); - } - public: Literal() : type(Type::none), i64(0) {} explicit Literal(Type type) : type(type), i64(0) {} @@ -98,6 +92,9 @@ public: Literal extendToSI64() const; Literal extendToUI64() const; Literal extendToF64() const; + Literal extendS8() const; + Literal extendS16() const; + Literal extendS32() const; Literal truncateToI32() const; Literal truncateToF32() const; @@ -106,6 +103,7 @@ public: Literal convertSToF64() const; Literal convertUToF64() const; + Literal eqz() const; Literal neg() const; Literal abs() const; Literal ceil() const; @@ -113,6 +111,7 @@ public: Literal trunc() const; Literal nearbyint() const; Literal sqrt() const; + Literal demote() const; Literal add(const Literal& other) const; Literal sub(const Literal& other) const; |