Stream: git-wasmtime

Topic: wasmtime / issue #11540 Unsupported feature for riscv: sh...


view this post on Zulip Wasmtime GitHub notifications bot (Aug 26 2025 at 13:25):

12101111 opened issue #11540:

Test Case

Test case from https://github.com/WebAssembly/testsuite/blob/main/address.wast

(module
  (memory 1)
  (data (i32.const 0) "abcdefghijklmnopqrstuvwxyz")

  (func (export "8u_bad") (param $i i32)
    (drop (i32.load8_u offset=4294967295 (local.get $i)))
  )
)

Steps to Reproduce

#[test]
fn test() {
    let mut config = Config::new();
    config.target("riscv64gc-unknown-none").unwrap();
    config.memory_init_cow(false);
    config.memory_reservation(0);
    config.memory_guard_size(0);
    config.memory_reservation_for_growth(0);
    config.signals_based_traps(false);
    let engine = Engine::new(&config).unwrap();
    let input = r#"
(module
  (memory 1)
  (data (i32.const 0) "abcdefghijklmnopqrstuvwxyz")

  (func (export "8u_bad") (param $i i32)
    (drop (i32.load8_u offset=4294967295 (local.get $i)))
  )
)
    "#;
    let _ = engine.precompile_module(input.as_bytes()).unwrap();
}

Expected Results

It should compile.

Actual Results

called `Result::unwrap()` on an `Err` value: Compilation error: Unsupported feature: should be implemented in ISLE: inst = `v10, v11 = uadd_overflow.i64 v8, v9  ; v9 = 0x0001_0000_0000`, type = `Some(types::I64)`

Versions and Environment

Wasmtime version or commit: e767c56b824e5ce8947997b052859e050419d35b and 36.0

Operating system: Linux

Architecture: riscv64gc

view this post on Zulip Wasmtime GitHub notifications bot (Aug 26 2025 at 13:25):

12101111 added the bug label to Issue #11540.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 26 2025 at 14:00):

alexcrichton added the cranelift:area:riscv64 label to Issue #11540.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 28 2025 at 16:54):

fitzgen added the good first issue label to Issue #11540.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 28 2025 at 16:54):

fitzgen added the cranelift:E-compiler label to Issue #11540.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 28 2025 at 16:54):

fitzgen added the cranelift:E-compiler-easy label to Issue #11540.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 28 2025 at 16:57):

fitzgen commented on issue #11540:

Thanks for filing this issue, @12101111.

FWIW, this is a pretty good first issue for Cranelift stuff, if anyone wants to dip their toes into compiler hacking! We just need to add a lowering rule for uadd_overflow to cranelift/codegen/src/isa/riscv64/lower.isle similar to the uadd_overflow rules we have for aarch64.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 31 2025 at 21:36):

thatrajeevkr commented on issue #11540:

can i work on this?

view this post on Zulip Wasmtime GitHub notifications bot (Aug 31 2025 at 22:14):

cfallin commented on issue #11540:

@thatrajeevkr yes, as noted above this is a good first issue -- no permission needed; feel free to submit a PR!

view this post on Zulip Wasmtime GitHub notifications bot (Sep 03 2025 at 17:25):

cfallin closed issue #11540:

Test Case

Test case from https://github.com/WebAssembly/testsuite/blob/main/address.wast

(module
  (memory 1)
  (data (i32.const 0) "abcdefghijklmnopqrstuvwxyz")

  (func (export "8u_bad") (param $i i32)
    (drop (i32.load8_u offset=4294967295 (local.get $i)))
  )
)

Steps to Reproduce

#[test]
fn test() {
    let mut config = Config::new();
    config.target("riscv64gc-unknown-none").unwrap();
    config.memory_init_cow(false);
    config.memory_reservation(0);
    config.memory_guard_size(0);
    config.memory_reservation_for_growth(0);
    config.signals_based_traps(false);
    let engine = Engine::new(&config).unwrap();
    let input = r#"
(module
  (memory 1)
  (data (i32.const 0) "abcdefghijklmnopqrstuvwxyz")

  (func (export "8u_bad") (param $i i32)
    (drop (i32.load8_u offset=4294967295 (local.get $i)))
  )
)
    "#;
    let _ = engine.precompile_module(input.as_bytes()).unwrap();
}

Expected Results

It should compile.

Actual Results

called `Result::unwrap()` on an `Err` value: Compilation error: Unsupported feature: should be implemented in ISLE: inst = `v10, v11 = uadd_overflow.i64 v8, v9  ; v9 = 0x0001_0000_0000`, type = `Some(types::I64)`

Versions and Environment

Wasmtime version or commit: e767c56b824e5ce8947997b052859e050419d35b and 36.0

Operating system: Linux

Architecture: riscv64gc


Last updated: Dec 06 2025 at 06:05 UTC