-
Notifications
You must be signed in to change notification settings - Fork 294
Restore cross checks, part 2: fix the Rust runtime and unit tests #1578
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
base: master
Are you sure you want to change the base?
Conversation
b2e9e11 to
dae5616
Compare
| let ch1 = unsafe { core::arch::x86_64::_mm_hadd_epi32(cmul.into(), cmul.into()) }; | ||
| let ch2 = unsafe { core::arch::x86_64::_mm_hadd_epi32(ch1, ch1) }; | ||
| let cval = unsafe { core::arch::x86_64::_mm_extract_epi32(ch2, 0) }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to worry about aarch64 portability here, or is this gated to x86[_64] only at a higher level?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This specific function is gated on the djb2-ssse3 feature for SSSE3 which I assumed people wouldn't even try to enable on aarch64 (and we didn't even have that back then). I could add extra build time checks to error out on that corner case, but is it worth it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's critical, was just curious what scaffolding we had in place here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I switched to a target_feature check per @kkysen 's suggestion. Doesn't that make the aarch64 check redundant?
fw-immunant
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. asm! changes seem semantics-preserving--volatile and clobbering flags is the default in rust unless opted out.
dae5616 to
9bea7c8
Compare
…d core::arch calls
9bea7c8 to
332ba16
Compare
No description provided.