WebAssembly / simd

Branch of the spec repo scoped to discussion of SIMD in WebAssembly
Other
527 stars 43 forks source link

Some memarg parameters lack a name, others don't #509

Closed nemequ closed 2 years ago

nemequ commented 3 years ago

It might be too late for this, but the proposal seems to be inconsistent about whether memarg parameters are named or not. For most instructions it is specified as just memarg, but for the load_lane and store_lane instructions it is m: memarg. Obviously it's not a big deal, but the inconsistency is somewhat perplexing.

FWIW, I'd prefer to just make them all named for consistency with the rest of the proposal, but if not it seems appropriate to make them consistently inconsistent with the rest of the proposal :)

dtig commented 3 years ago

The overview document is inconsistent about how it uses memarg parameter, a better reference may be the https://github.com/WebAssembly/simd/blob/main/proposals/simd/BinarySIMD.md document for the immediate operands that go into each operation. FWIW, the overview documents work well for iterating over the proposal, but sometimes can be imprecise. The text that gets merged into the main spec is updated in the document/ folder to be consistent with the formal WebAssembly spec. That said, I have no objections to the overview document using named memarg parameters everywhere (PRs welcome!).