Stream: git-wasmtime

Topic: wasmtime / issue #10254 Cranelift: Support loading and st...


view this post on Zulip Wasmtime GitHub notifications bot (Feb 20 2025 at 14:09):

bjorn3 opened issue #10254:

Feature

While Cranelift can represent vector types smaller than 128bit, load and store operations for these smaller vector types are not implemented.

Benefit

Rustc has started passing vector types in vector registers on x86_64. Some of these vector types may be smaller than 128bit. Previously these vector types didn't need to be exposed to Cranelift as all vector operations are emulated by cg_clif using scalar operations. However now that they are passed in vector registers, cg_clif needs to use vector types at the ABI level and thus needs to support loading and storing small vectors.

Implementation

TODO: Do you have an implementation plan, and/or ideas for data structures or
algorithms to use?

Alternatives

Have a bunch of code in cg_clif dedicated to handling this. I probably need this anyway for the time being, but I prefer if I can get rid of it as soon as possible through native Cranelift support.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 20 2025 at 14:11):

bjorn3 commented on issue #10254:

Looks like a workaround in cg_clif based on bitcast doesn't work.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 20 2025 at 14:24):

bjorn3 edited a comment on issue #10254:

Looks like a workaround in cg_clif based on bitcast doesn't work.

Edit: Right, that is at the very least #6104.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 27 2025 at 17:59):

fitzgen added the enhancement label to Issue #10254.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 27 2025 at 17:59):

fitzgen added the cranelift label to Issue #10254.


Last updated: Feb 28 2025 at 02:27 UTC