bytecodealliance / bytecodealliance/wasmtime
Cranelift: `srem.i128`/`urem.i128` not implemented on x86_64
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.8k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 126
Description
👋 Hey
### `.clif` Test Case
```
test interpret
test run
set enable_llvm_abi_extensions
target x86_64
function %srem_i128(i128, i128) -> i128 {
block0(v0: i128, v1: i128):
v3 = srem v0, v1
return v3
}
; run: %srem_i128(4352, -1) == 0
function %urem_i128(i128, i128) -> i128 {
block0(v0: i128, v1: i128):
v3 = urem v0, v1
return v3
}
; run: %urem_i128(4352, -1) == 4352
```
### Steps to Reproduce
* `clif-util test ./the-above.clif`
### Expected Results
The above test to pass
### Actual Results
```
Finished dev [unoptimized + debuginfo] target(s) in 0.14s
Running `/home/afonso/git/wasmtime/target/debug/clif-util test ./lmao.clif`
thread 'worker #0' panicked at 'called `Option::unwrap()` on a `None` value', cranelift/codegen/src/isa/x64/lower/isle.rs:79:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #0: called `Option::unwrap()` on a `None` value
FAIL ./lmao.clif: panicked in worker #0: called `Option::unwrap()` on a `None` value
1 tests
Error: 1 failure
```
This gives a slightly different error message than usual, but it should be the same root cause.
### Versions and Environment
Cranelift version or commit: main
Operating system: Linux
Architecture: x86_64
Contributor guide
Assessment
This issue has not been assessed yet.