bytecodealliance / wasmtime

A fast and secure runtime for WebAssembly
https://wasmtime.dev/
Apache License 2.0
14.81k stars 1.24k forks source link

riscv64: Add support for `bitcast.i128` with a `i128` argument #8851

Closed afonso360 closed 1 week ago

afonso360 commented 1 week ago

👋 Hey,

This PR fixes an issue discovered by fuzzing. #8692 expanded our support for bitcasts, and also enabled them in the cranelift fuzzer for the RISC-V backend.

It turns out that bitcast.i128 with a i128 argument wasn't supported in the backend, but was technically legal CLIF.

This PR adds that lowering and a testcase to ensure this doesn't regress.