Skip to content

Cranelift: cls not implemented for any type on x86_64 #5107

@afonso360

Description

@afonso360

👋 Hey,

Fuzzgen found this when adding support for this instruction.

.clif Test Case

test interpret
test run
set enable_llvm_abi_extensions=true
target x86_64

function %a(i64) -> i64 {
block0(v0: i64):
    v1 = cls.i64 v0
    return v1
}
; run: %a(1) == 62

Steps to Reproduce

  • clif-util test ./the-above.clif

Expected Results

The above tests to pass.

Actual Results

    Finished dev [unoptimized + debuginfo] target(s) in 0.15s
     Running `/home/afonso/git/wasmtime/target/debug/clif-util test ./lmao.clif`
thread 'worker #0' panicked at 'not implemented: Cls not supported', cranelift/codegen/src/isa/x64/lower.rs:494:24
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #0: not implemented: Cls not supported
FAIL ./lmao.clif: panicked in worker #0: not implemented: Cls not supported
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main
Operating system: Windows
Architecture: x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIncorrect behavior in the current implementation that needs fixingcraneliftIssues related to the Cranelift code generatorgood first issueIssues that are good for new contributors to tackle!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions