diff options
author | Alex Crichton <alex@alexcrichton.com> | 2018-05-25 10:54:05 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2018-05-25 08:54:05 -0700 |
commit | becfa3ee4214bb4e6fbe1dbdbf6c3756c548d82b (patch) | |
tree | 1108b2519d6ac1f97ae12b0d32792aa15a4e9237 /src/passes/intrinsics-module.h | |
parent | 6e56ef195d01936c0c7f7a6d1c0f5d1c7e2c2e52 (diff) | |
download | binaryen-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/intrinsics-module.h')
-rw-r--r-- | src/passes/intrinsics-module.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/passes/intrinsics-module.h b/src/passes/intrinsics-module.h new file mode 100644 index 000000000..c9a757dc0 --- /dev/null +++ b/src/passes/intrinsics-module.h @@ -0,0 +1,27 @@ +/* + * Copyright 2018 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef passes_intrinsics_module_h +#define passes_intrinsics_module_h + +namespace wasm { + +extern const char* IntrinsicsModuleWast; + +} // namespace wasm + +#endif // passes_intrinsics_module_h + |