mathieuchartier / mcm

MCM file compressor
GNU General Public License v3.0
110 stars 24 forks source link

x86-only intrinsics #13

Open NavinF opened 7 years ago

NavinF commented 7 years ago

mcm uses SSE intrinsics so it doesn't build on ARM. Maybe you could use the same approach the Skia folks used to generate good code for SSE, NEON, and CPUs with no SIMD instructions: https://skia.org/dev/contrib/simd

nemequ commented 6 years ago

If you want something easier, you could use one of my projects: SIMDe. It currently contains portable implementations of all SSE intrinsics through SSSE3, and many functions have NEON implementations as well.

Based on some quick grepping I think SIMDe already supports all the functions which MCM uses, so it would be pretty straightforward to make the change. I'd be willing to supply a patch if you're interested.

Of course performance wouldn't be as good as something rewritten for NEON (and AltiVec, and MSA, etc.) by someone with a deep knowledge of the target ISA extension but it would get MCM up and running on other architectures quickly, and you can always create specialized implementation(s) later.

If you'd like to see an example, I have a fork of LZSSE which uses SIMDe successfully.