Skip to content

Rename various SIMD load instructions #3795

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

Merged
merged 1 commit into from
Apr 11, 2021
Merged

Conversation

dcodeIO
Copy link
Contributor

@dcodeIO dcodeIO commented Apr 10, 2021

Renames the SIMD instructions

  • LoadSplatVec8x16 -> Load8SplatVec128
  • LoadSplatVec16x8 -> Load16SplatVec128
  • LoadSplatVec32x4 -> Load32SplatVec128
  • LoadSplatVec64x2 -> Load64SplatVec128
  • Load32Zero -> Load32ZeroVec128
  • Load64Zero -> Load64ZeroVec128

as per #3784 (comment).

@dcodeIO
Copy link
Contributor Author

dcodeIO commented Apr 10, 2021

There are also

  • LoadExtSVec8x8ToVecI16x8
  • LoadExtUVec8x8ToVecI16x8
  • LoadExtSVec16x4ToVecI32x4
  • LoadExtUVec16x4ToVecI32x4
  • LoadExtSVec32x2ToVecI64x2
  • LoadExtUVec32x2ToVecI64x2

mapping to

  • v128.load8x8_s(memarg) -> v128: load eight 8-bit integers and sign extend each one to a 16-bit lane
  • v128.load8x8_u(memarg) -> v128: load eight 8-bit integers and zero extend each one to a 16-bit lane
  • v128.load16x4_s(memarg) -> v128: load four 16-bit integers and sign extend each one to a 32-bit lane
  • v128.load16x4_u(memarg) -> v128: load four 16-bit integers and zero extend each one to a 32-bit lane
  • v128.load32x2_s(memarg) -> v128: load two 32-bit integers and sign extend each one to a 64-bit lane
  • v128.load32x2_u(memarg) -> v128: load two 32-bit integers and zero extend each one to a 64-bit lane

but these seem a bit odd in that they use the v128 namespace, though it may be arguable that these may as well use the i16x8 etc. namespaces to denote their return value (which would then match their naming in Binaryen), so I didn't rename these yet. Do you know why these are specced to use v128?

@dcodeIO
Copy link
Contributor Author

dcodeIO commented Apr 10, 2021

Found this issue for reference meanwhile: WebAssembly/simd#297. Makes sense when thinking about the common denominator being loads.

@dcodeIO
Copy link
Contributor Author

dcodeIO commented Apr 10, 2021

Perhaps names could be:

  • LoadExtSVec8x8ToVecI16x8 -> Load8x8SVec128
  • LoadExtUVec8x8ToVecI16x8 -> Load8x8UVec128
  • LoadExtSVec16x4ToVecI32x4 -> Load16x4SVec128
  • LoadExtUVec16x4ToVecI32x4 -> Load16x4UVec128
  • LoadExtSVec32x2ToVecI64x2 -> Load32x2SVec128
  • LoadExtUVec32x2ToVecI64x2 -> Load32x2UVec128

@tlively
Copy link
Member

tlively commented Apr 11, 2021

That looks good to me!

@dcodeIO dcodeIO merged commit 70d6232 into WebAssembly:main Apr 11, 2021
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