stdarch icon indicating copy to clipboard operation
stdarch copied to clipboard

Missing x86/_64 MMX functions

Open TheDan64 opened this issue 7 years ago • 3 comments

It seems like _mm_empty, _mm_madd_pi16, _mm_xor_si64 and a handful of other simd functions don't exist, neither in stable nor behind the stdsimd feature. In fact, it seems like the remaining TODO list in #40 is unimplemented.

I was just wondering if there is any technical reason for these missing functions, or have they just not been implemented yet?

Thanks!

TheDan64 avatar Oct 08 '18 18:10 TheDan64

Ah if these are missing it's just by mistake! Then can be added at any time :)

alexcrichton avatar Oct 08 '18 19:10 alexcrichton

Ah, that's good to know! So most of the functions that I've found to be missing seem to be in the aforementioned TODO list under MMX & SSE. I've also found these two which aren't listed there: _mm_cvtph_ps & _mm_mulhrs_pi16 but can be found in the standard C SIMD headers

Edit: Another one not listed which seems to be missing: _mm_setr_epi64x. I can't find it in the intel intrinsics guide, but seems to be a thing from what I've read... and _mm_set_epi64x is the corresponding non reverse initializer

TheDan64 avatar Oct 08 '18 19:10 TheDan64

Ah so we haven't actually stabilized (or pursued too aggressively) the MMX-related intrinsics as they have weird ABI issues in LLVM and don't seem to be too widely used in the wild (those intrinsics with __m64), but we can always add them as unstable at least!

alexcrichton avatar Oct 08 '18 19:10 alexcrichton

Direct MMX support is no longer in scope for std::arch, see:

  • https://github.com/rust-lang/stdarch/pull/890

workingjubilee avatar Aug 31 '22 01:08 workingjubilee