diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-05-03 22:01:14 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-05-03 22:01:14 -0700 |
commit | c7d7083920ddd9ff7d1a44577287b8ecc048a221 (patch) | |
tree | 1eb9e0cd2e50566b62f65171ccc35b29f8ca5c4d /src/wasm.h | |
parent | 5b2adeb4b2a66dfcda7667ce7a4c27ec49c62b1b (diff) | |
download | binaryen-c7d7083920ddd9ff7d1a44577287b8ecc048a221.tar.gz binaryen-c7d7083920ddd9ff7d1a44577287b8ecc048a221.tar.bz2 binaryen-c7d7083920ddd9ff7d1a44577287b8ecc048a221.zip |
Harmonize the internal opcodes with the binary format (#433)
* harmonize the internal opcodes with the binary format, so they clearly parallel, and also this helps us avoid needing the type to disambiguate
* comment on GetLocal in C API
Diffstat (limited to 'src/wasm.h')
-rw-r--r-- | src/wasm.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/wasm.h b/src/wasm.h index e3c8ea7d9..843b4bc6c 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -732,8 +732,14 @@ enum UnaryOp { // relational EqZ, // conversions - ExtendSInt32, ExtendUInt32, WrapInt64, TruncSFloat32, TruncUFloat32, TruncSFloat64, TruncUFloat64, ReinterpretFloat, // int - ConvertSInt32, ConvertUInt32, ConvertSInt64, ConvertUInt64, PromoteFloat32, DemoteFloat64, ReinterpretInt // float + ExtendSInt32, ExtendUInt32, // extend i32 to i64 + WrapInt64, // i64 to i32 + TruncSFloat32ToInt32, TruncSFloat32ToInt64, TruncUFloat32ToInt32, TruncUFloat32ToInt64, TruncSFloat64ToInt32, TruncSFloat64ToInt64, TruncUFloat64ToInt32, TruncUFloat64ToInt64, // float to int + ReinterpretFloat32, ReinterpretFloat64, // reintepret bits to int + ConvertSInt32ToFloat32, ConvertSInt32ToFloat64, ConvertUInt32ToFloat32, ConvertUInt32ToFloat64, ConvertSInt64ToFloat32, ConvertSInt64ToFloat64, ConvertUInt64ToFloat32, ConvertUInt64ToFloat64, // int to float + PromoteFloat32, // f32 to f64 + DemoteFloat64, // f64 to f32 + ReinterpretInt32, ReinterpretInt64 // reinterpret bits to float }; enum BinaryOp { |