summaryrefslogtreecommitdiff
path: root/src/passes/CMakeLists.txt
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2018-05-25 10:54:05 -0500
committerAlon Zakai <alonzakai@gmail.com>2018-05-25 08:54:05 -0700
commitbecfa3ee4214bb4e6fbe1dbdbf6c3756c548d82b (patch)
tree1108b2519d6ac1f97ae12b0d32792aa15a4e9237 /src/passes/CMakeLists.txt
parent6e56ef195d01936c0c7f7a6d1c0f5d1c7e2c2e52 (diff)
downloadbinaryen-becfa3ee4214bb4e6fbe1dbdbf6c3756c548d82b.tar.gz
binaryen-becfa3ee4214bb4e6fbe1dbdbf6c3756c548d82b.tar.bz2
binaryen-becfa3ee4214bb4e6fbe1dbdbf6c3756c548d82b.zip
wasm2asm: Finish i64 lowering operations (#1563)
* wasm2asm: Finish i64 lowering operations This commit finishes out lowering i64 operations to JS with implementations of division and remainder for JS. The primary change here is to have these compiled from Rust to wasm and then have them "linked in" via intrinsics. The `RemoveNonJSOps` pass has been updated to include some of what `I64ToI32Lowering` was previously doing, basically replacing some instructions with calls to intrinsics. The intrinsics are now all tracked in one location. Hopefully the intrinsics don't need to be regenerated too much, but for posterity the source currently [lives in a gist][gist], although I suspect that gist won't continue to compile and work as-is for all of time. [gist]: https://gist.github.com/alexcrichton/e7ea67bcdd17ce4b6254e66f77165690
Diffstat (limited to 'src/passes/CMakeLists.txt')
-rw-r--r--src/passes/CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/passes/CMakeLists.txt b/src/passes/CMakeLists.txt
index 2c48e3d6e..05ed3821b 100644
--- a/src/passes/CMakeLists.txt
+++ b/src/passes/CMakeLists.txt
@@ -1,3 +1,8 @@
+add_custom_command(
+ OUTPUT WasmIntrinsics.cpp
+ COMMAND python ../../scripts/embedwast.py ${CMAKE_CURRENT_BINARY_DIR}/WasmIntrinsics.cpp
+ DEPENDS ../../scripts/embedwast.py wasm-intrinsics.wast)
+
SET(passes_SOURCES
pass.cpp
CoalesceLocals.cpp
@@ -45,5 +50,6 @@ SET(passes_SOURCES
SSAify.cpp
Untee.cpp
Vacuum.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/WasmIntrinsics.cpp
)
ADD_LIBRARY(passes STATIC ${passes_SOURCES})