Skip to content
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

_mm_storeu_si16 and _mm_storeu_si64 are missing but not documented as such #62743

Open
Lokathor opened this issue Jul 17, 2019 · 2 comments
Open
Labels
A-simd Area: SIMD (Single Instruction Multiple Data) O-x86_32 Target: x86 processors, 32 bit (like i686-*) O-x86_64 Target: x86-64 processors (like x86_64-*) T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@Lokathor
Copy link
Contributor

They're both missing from core::arch::x86 and core::arch::x86_64.

It might be fine in a sense that they're missing, since there's still also core::arch::x86_64::_mm_storeu_si128 which is basically the same thing, but either they should be added in for completeness or there should be documentation on the fact that they're deliberately missing.

@jonas-schievink jonas-schievink added A-simd Area: SIMD (Single Instruction Multiple Data) O-x86 T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Jul 17, 2019
@lassade
Copy link

lassade commented Aug 16, 2020

It isn't exactly the same thing, _mm_storeu_si64 stores only the frist 8 bytes, while _mm_storeu_si128 store all 16;

Some algorithms may require it, like a base64 decoder: processing 16 hexadecimal chars yields 8 bytes of data, having this intrinsic will greatly reduce the complexity of the final code;

@lassade
Copy link

lassade commented Aug 18, 2020

After bit of digging, I figure out that we only need these functions for completeness.

Who ever need these functions should instead use core::ptr::copy_nonoverlapping the assembly generated is optimum:

  1. clang with intrinsic: https://godbolt.org/z/3GcGvE
  2. rust version: https://play.rust-lang.org/?version=stable&mode=release&edition=2018&gist=9019494e9cdeae78aa76bdb1674c08fb

@Nilstrieb Nilstrieb added O-x86_64 Target: x86-64 processors (like x86_64-*) O-x86_32 Target: x86 processors, 32 bit (like i686-*) and removed O-x86-all labels Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-simd Area: SIMD (Single Instruction Multiple Data) O-x86_32 Target: x86 processors, 32 bit (like i686-*) O-x86_64 Target: x86-64 processors (like x86_64-*) T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants