Restore cross checks, part 2: fix the Rust runtime and unit tests#1578
Restore cross checks, part 2: fix the Rust runtime and unit tests#1578
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.
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.
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.
I don't think it's critical, was just curious what scaffolding we had in place here.
There was a problem hiding this comment.
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.
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.