summaryrefslogtreecommitdiff
path: root/src/passes/pass.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2018-05-15 10:53:49 -0500
committerAlon Zakai <alonzakai@gmail.com>2018-05-15 08:53:49 -0700
commit95990c43cc8a1af46af630841e6a430a71f6ea8a (patch)
treea591c1c7bf404da819e8c73da6b018b08d9bb868 /src/passes/pass.cpp
parent4615f00d6fdc314e6ca08ad3abbd42bfed60737c (diff)
downloadbinaryen-95990c43cc8a1af46af630841e6a430a71f6ea8a.tar.gz
binaryen-95990c43cc8a1af46af630841e6a430a71f6ea8a.tar.bz2
binaryen-95990c43cc8a1af46af630841e6a430a71f6ea8a.zip
wasm2asm: Implement f32/f64.copysign (#1551)
This commit implements the `copysign` instruction for the wasm2asm binary. The implementation here is a new pass which wholesale replaces `copysign` instructions with the equivalent bit ops and reinterpretation instructions. It's intended that this matches Emscripten's implementation of lowering here.
Diffstat (limited to 'src/passes/pass.cpp')
-rw-r--r--src/passes/pass.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/passes/pass.cpp b/src/passes/pass.cpp
index 5c43aaa4e..e820cd1fa 100644
--- a/src/passes/pass.cpp
+++ b/src/passes/pass.cpp
@@ -99,6 +99,7 @@ void PassRegistry::registerPasses() {
registerPass("print-full", "print in full s-expression format", createFullPrinterPass);
registerPass("print-call-graph", "print call graph", createPrintCallGraphPass);
registerPass("relooper-jump-threading", "thread relooper jumps (fastcomp output only)", createRelooperJumpThreadingPass);
+ registerPass("remove-copysign", "removes the copysign instruction", createRemoveCopysignPass);
registerPass("remove-imports", "removes imports and replaces them with nops", createRemoveImportsPass);
registerPass("remove-memory", "removes memory segments", createRemoveMemoryPass);
registerPass("remove-unused-brs", "removes breaks from locations that are not needed", createRemoveUnusedBrsPass);