]> git.sesse.net Git - x264/commit
x86: Remove X264_CPU_SSE_MISALIGN functions
authorHenrik Gramner <henrik@gramner.com>
Fri, 5 Jul 2013 19:15:43 +0000 (21:15 +0200)
committerFiona Glaser <fiona@x264.com>
Fri, 5 Jul 2013 20:10:06 +0000 (13:10 -0700)
commitff41804efd4caec120fc9e1b90ad226035f75aaa
tree8237e0f74d80b0cc35daae0eefa0319f5ebf2c87
parent01087fdbf2042095cb36458fd5c5efab3f4b3a37
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