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

Add _mm_loadu_si64 #870

Merged
merged 8 commits into from
Jul 16, 2020
Merged

Add _mm_loadu_si64 #870

merged 8 commits into from
Jul 16, 2020

Conversation

pickfire
Copy link
Contributor

Fix #40

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @gnzlbg (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@Amanieu
Copy link
Member

Amanieu commented Jul 4, 2020

Can you rebase this? The CI failures should be fixed now.

@pickfire
Copy link
Contributor Author

thread 'core_arch::x86::sse::assert__mm_loadu_si64_movups' panicked at 'failed to find instruction movups in the disassembly', crates/stdarch-test/src/lib.rs:157:9

What should I do? Should I change #[cfg_attr(test, assert_instr(movups))]?

@Amanieu
Copy link
Member

Amanieu commented Jul 11, 2020

movups is a 128-bit move. You want movq which is a 64-bit move.

@pickfire
Copy link
Contributor Author

Oh, it didn't use movq in the resulting code. It should be though.

@pickfire
Copy link
Contributor Author

pickfire commented Jul 13, 2020

error[E0635]: unknown feature const_transmute? Weird, is that removed from nightly?

@Amanieu
Copy link
Member

Amanieu commented Jul 13, 2020

const_transmute is now stable, you can remove the feature flag.

@Amanieu Amanieu merged commit de984bc into rust-lang:master Jul 16, 2020
@Amanieu
Copy link
Member

Amanieu commented Jul 16, 2020

Thanks!

@pickfire pickfire deleted the _mm_loadu_si64 branch July 17, 2020 14:36
@pickfire
Copy link
Contributor Author

pickfire commented Jul 17, 2020

@Amanieu Can you please mark this function done in #40 first post checklist? Quite an interesting experience for me to work on this.

@Amanieu
Copy link
Member

Amanieu commented Jul 17, 2020

Done! However I am having second thoughts about exposing this function in SSE instead of SSE2. The Intel documentation seems to be incorrect since it says that this should use the MOVQ instruction but that instruction is only available in SSE2. Also both Clang and GCC only expose this intrinsic in the SSE2 header (emmintrin.h) rather than the SSE one (xmmintrin.h).

@pickfire
Copy link
Contributor Author

But even though Intel documentation is incorrect we need to follow them right?

@Amanieu
Copy link
Member

Amanieu commented Jul 18, 2020

Not really. IMO we should be following GCC and Clang which are the "standard" implementation for the compiler intrinsics. I believe even the Intel compiler puts _mm_loadu_si64 in emmintrin.h which implies it is a SSE2 intrinsic.

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.

Implement all x86 vendor intrinsics
5 participants