bytecodealliance / bytecodealliance/wasmtime

Cranelift: `srem.i128`/`urem.i128` not implemented on AArch64

Open
#5,472 0 comments 0 reactions 0 assignees View on GitHub
bug cranelift
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
target aarch64

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 `qemu-aarch64 -L /usr/aarch64-linux-gnu -E LD_LIBRARY_PATH=/usr/aarch64-linux-gnu/lib /home/afonso/git/wasmtime/target/aarch64-unknown-linux-gnu/debug/clif-util test ./lmao.clif`
thread 'worker #1' panicked at 'should be implemented in ISLE: inst = `v3 = srem.i128 v0, v1`, type = `Some(types::I128)`', cranelift/codegen/src/machinst/lower.rs:753:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #1: should be implemented in ISLE: inst = `v3 = srem.i128 v0, v1`, type = `Some(types::I128)`
FAIL ./lmao.clif: panicked in worker #1: should be implemented in ISLE: inst = `v3 = srem.i128 v0, v1`, type = `Some(types::I128)`
1 tests
Error: 1 failure
```

### Versions and Environment

Cranelift version or commit: main
Operating system: Linux
Architecture: AArch64

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.