WebAssembly / simd

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

Rename integer-to-integer widening instructions to "extend"? #467

Closed ngzhian closed 3 years ago

ngzhian commented 3 years ago

Referring to this section https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md#integer-to-integer-widening, was there a reason why we chose "widen"? That isn't a terminology used in the current Wasm spec, it uses "extend" (e.g. see https://webassembly.github.io/spec/core/appendix/index-instructions.html).

Can we change the names to extend? (Everything else stays the same, only s/widen/extend/.

tlively commented 3 years ago

SGTM

zeux commented 3 years ago

If we switch from widen to extend, what do we do with narrow? Doesn't look like scalar spec has an equivalent.

tlively commented 3 years ago

The scalar spec has i32.wrap_i64, but wrap isn't great for the SIMD version because it saturates rather than wrapping :/

ngzhian commented 3 years ago

We can keep narrow since there is no equivalent instruction in scalar spec.

tlively commented 3 years ago

There were no strong objections to this renaming at today's meeting. @ngzhian, do you want to put a PR together?