x86: Remove X264_CPU_SSE_MISALIGN functions
authorHenrik Gramner <henrik@gramner.com>
Fri, 5 Jul 2013 19:15:43 +0000 (21:15 +0200)
committerJason Garrett-Glaser <jason@x264.com>
Fri, 5 Jul 2013 20:10:06 +0000 (13:10 -0700)
commit0c738e30ec025f0effdb62802685fce40cf20057
tree855a5ac4630b5816645edfbcd1cb14cdc05bd3f2
parentf0c1c53d58420d209f0fb7b63e49125ab1c85aa7
x86: Remove X264_CPU_SSE_MISALIGN functions

Prevents a crash if the misaligned exception mask bit is cleared for some reason.

Misaligned SSE functions are only used on AMD Phenom CPUs and the benefit is miniscule.
They also require modifying the MXCSR control register and by removing those functions
we can get rid of that complexity altogether.

VEX-encoded instructions also supports unaligned memory operands. I tried adding AVX
implementations of all removed functions but there were no performance improvements on
Ivy Bridge. pixel_sad_x3 and pixel_sad_x4 had significant code size reductions though
so I kept them and added some minor cosmetics fixes and tweaks.
14 files changed:
common/cpu.c
common/cpu.h
common/pixel.c
common/x86/cpu-a.asm
common/x86/mc-a.asm
common/x86/mc-a2.asm
common/x86/mc-c.c
common/x86/pixel.h
common/x86/sad-a.asm
common/x86/x86inc.asm
encoder/encoder.c
encoder/lookahead.c
tools/checkasm.c
x264.h