5 ms·
Doesn't asm have the disadvantage that you end up spilling if you exceed 8 xmm registers even when running on x86_64 with 16 xmm registers available? Or do you
by hsivonen 8y ago
Doesn't asm have the disadvantage that you end up spilling if you exceed 8 xmm registers even when running on x86_64 with 16 xmm registers available?
Or do you actually write separate asm for x86 and x86_64?
- Retr0spectrum 8y agoI would imagine they write separate asm for x86, x86_64, and the various instruction set extensions that exist.
- __s 8y agoA project may even go so far as to write different asm for the same ISA for different architectures in order to optimize for specific pipeline behavior or whatnot https://github.com/z-classic/libgmp/tree/master/mpn/x86_64 https://github.com/z-classic/libgmp/tree/master/mpn/x86_64
- TD-Linux 8y agoYou either write an entire separate asm function, or use macro utilities to ifdef portions of the function. See for example: https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavcodec/x86/vp9mc.asm https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavcod...