Skip to content

Conversation

@chharvey
Copy link
Contributor

@chharvey chharvey commented Sep 8, 2025

The i32x4 and i64x2 only have extract_lane (there is no signed or unsigned version).

See https://webassembly.github.io/spec/core/syntax/instructions.html#vector-instructions for details.

The `i32x4` and `i64x2` only have `extract_lane` (there is no signed or unsigned version).
See https://webassembly.github.io/spec/core/syntax/instructions.html#vector-instructions for details.
Copy link
Member

@CountBleck CountBleck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good.

Since we're here, I tried to look for some other errors, to see if this was a standalone issue...I don't think iNxM.any_true exists? Only v128.any_true and iNxM.all_true...this is my reference by the way.

Do you want to look through the file and find/fix those errors as well (that is, if you would like to)?

@chharvey
Copy link
Contributor Author

chharvey commented Sep 8, 2025

@CountBleck you’re right, there are definitely discrepancies between the spec (which I think the index.d.ts file mirrors pretty well at first glance) and the README. They are probably due to careless copy-pasting when the vector instruction docs were added 6 years ago.

According to the W3C spec (which seems to be more official than the one at https://webassembly.github.io/spec/), only v128 has any_true, and only the “ishapes” (i8x16, i16x8, i32x4, i64x2) have all_true.

I can make those specific edits here if you want, but I think more time should be spent meticulously going over all the instructions for all the types and making sure the README matches — That might be beyond the scope of this PR. It might even involve some automation.

@CountBleck
Copy link
Member

Fair enough. I'll go ahead and merge this in the meantime.

By the way, I would use https://webassembly.github.io/spec/core for the spec and not the W3C copy, since the former is more up-to-date.

On another note, this repo's docs and type declarations are mirroring the API Binaryen exposes (specifically, that file I sent you), not the spec directly, since this repo is adding docs/typing for/on top of that API.

@CountBleck CountBleck merged commit 001f9a5 into AssemblyScript:main Sep 8, 2025
@chharvey chharvey deleted the patch-1 branch October 2, 2025 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants