-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for v128
#106
Comments
I don't think |
Adding a 128 bit field to wasm_val_t will double the size of all parameter vectors etc., so it's kind of undesirable -- and not a sustainable direction if the plan is to add even larger SIMD types later. As @binji suggested on #66, it might be best to represent such values via an indirection. As an aside, SIMD is still a fair way from standardisation. I'm not sure we want to put it into the C API MVP. Create a branch for that perhaps? |
Yeah, it does makes sense to wait until that happens. I guess we could leave this open to remember the discussion for when that happens. Combining both of your comments on the type itself, we are looking at something like |
Something like that, plus suitable ownership management (which is where it gets nasty). |
If I think a better solution would be to get rid of
|
@AndrewScheidecker, we don't know of any way to provide a generic and portably implementable call interface for functions in the absence of val_t. Also, automatic ownership management of reference values in the C++ API layer depends on it. |
As I was working on bytecodealliance/wasmtime#330 I ran into some build issues due to the lack of
v128
support in this library. I do have changes ready for supporting this new type but thought it best to discuss in an issue before opening a PR.To add support for
v128
, my changes towasm.h
would consist of:typedef __uint128_t v128_t;
(it is debatable whether__uint128_t
is the right type to use here)v128_t v128
field to thewasm_val_t
union for storing thev128
bytes (any concerns with endianness?)WASM_V128
to thewasm_valkind_enum
for identifying the new typeWould this be sufficient to add the
v128
type?The text was updated successfully, but these errors were encountered: