summaryrefslogtreecommitdiff
path: root/src/wasm/literal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/literal.cpp')
-rw-r--r--src/wasm/literal.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wasm/literal.cpp b/src/wasm/literal.cpp
index be1363dde..de89a7ac1 100644
--- a/src/wasm/literal.cpp
+++ b/src/wasm/literal.cpp
@@ -93,6 +93,12 @@ bool Literal::operator!=(const Literal& other) const {
return !(*this == other);
}
+bool Literal::bitwiseEqual(const Literal& other) const {
+ if (type != other.type) return false;
+ if (type == none) return true;
+ return getBits() == other.getBits();
+}
+
uint32_t Literal::NaNPayload(float f) {
assert(std::isnan(f) && "expected a NaN");
// SEEEEEEE EFFFFFFF FFFFFFFF FFFFFFFF