summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-03-21 16:55:00 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-03-21 16:55:00 -0700
commitc46ef0905565dfa9e24067a050d6c5095178c4ec (patch)
treea1c6a547e91cf05877139aee08e3fdcd96cf85dc /src/wasm.h
parentc34ed229b2df8bf4e8d0773917d0301c034980e3 (diff)
parent18ac67a3a23f4c54d4deab2d6621601662af899e (diff)
downloadbinaryen-c46ef0905565dfa9e24067a050d6c5095178c4ec.tar.gz
binaryen-c46ef0905565dfa9e24067a050d6c5095178c4ec.tar.bz2
binaryen-c46ef0905565dfa9e24067a050d6c5095178c4ec.zip
Merge pull request #268 from WebAssembly/eqz-type
Update EqZ operators and support specifying memory size on the command line
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/wasm.h b/src/wasm.h
index 2fcc3cddc..7422dd85d 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -681,8 +681,10 @@ public:
// Operators
enum UnaryOp {
- Clz, Ctz, Popcnt, EqZ, // int
+ Clz, Ctz, Popcnt, // int
Neg, Abs, Ceil, Floor, Trunc, Nearest, Sqrt, // float
+ // relational
+ EqZ,
// conversions
ExtendSInt32, ExtendUInt32, WrapInt64, TruncSFloat32, TruncUFloat32, TruncSFloat64, TruncUFloat64, ReinterpretFloat, // int
ConvertSInt32, ConvertUInt32, ConvertSInt64, ConvertUInt64, PromoteFloat32, DemoteFloat64, ReinterpretInt // float
@@ -972,6 +974,11 @@ public:
UnaryOp op;
Expression *value;
+
+ // the type is always the type of the operands,
+ // except for relationals
+
+ bool isRelational() { return op == EqZ; }
};
class Binary : public Expression {