mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 14:25:32 +00:00
2695093a03
863: Rewrite Min/Max to handle all cases correctly. Fixes 545 spectest failures. r=nlewycky a=nlewycky # Description The llvm backend was not quite following the Wasm spec for {F32,F64,F32x4xF64x2}{Min,Max}. We used the `@llvm.minnum` and `@llvm.maxnum` intrinsics which don't handle the corner cases the same. When we tried to use `@llvm.minimum` and `@llvm.maximum` which do, we get an internal error from the x86 backend. I was hoping that crash would go away with the upgrade to LLVM 9, but it does not. Reimplement these operations using plain LLVM instructions. # Review - [x] Add a short description of the the change to the CHANGELOG.md file Co-authored-by: Nick Lewycky <nick@wasmer.io> |
||
---|---|---|
.. | ||
cpp | ||
src | ||
build.rs | ||
Cargo.toml | ||
README.md |
Wasmer LLVM backend
Wasmer is a standalone JIT WebAssembly runtime, aiming to be fully compatible with Emscripten, Rust and Go. Learn more.
This crate represents the LLVM backend integration for Wasmer.
Usage
Usage in Wasmer Standalone
If you are using the wasmer
CLI, you can specify the backend with:
wasmer run program.wasm --backend=llvm
Usage in Wasmer Embedded
If you are using Wasmer Embedded, you can specify
the LLVM backend to the compile_with
function:
use wasmer_llvm_backend::LLVMCompiler;
// ...
let module = wasmer_runtime_core::compile_with(&wasm_binary[..], &LLVMCompiler::new());