Hi, All!<div><br></div><div>I've found a bug in x264 which will very likely cause a crash on x86 machines, supporting SSSE3 instruction set</div><div>This bug is in mc_chroma_ssse3_cache64 function and is caused by movdqa instruction used to transfer xmm6 register</div>
<div>content to unaligned address on stack (r0m register). Just changing movdqa to movdqu does not solve the problem,</div><div>as below is pmaddsubsw instruction which has the same address on stack as a parameter</div><div>
<br></div><div>As all xmm registers are being used in this function one cannot just uase some xmmN register as temporary storage.</div><div>My solution is not very effective but still working - I'm using temporary r4m register to save xmm6 register, than load value</div>
<div>from r0m to xmm6 and than use xmm6 as an argument for pmaddubsw. Just like this</div><div><br></div><div>; This is what was originally in mc-a.asm (mult1 is an alias for r0m)</div><div><div>; pmaddubsw m2, mult1</div>
<div>; pmaddubsw m3, mult1</div></div><div><br></div><div>; Below is my changes (applied for x86 arch only)</div><div><div> movu r4m, m6</div><div> movu m6, r0m</div><div> pmaddubsw m2, m6</div><div> pmaddubsw m3, m6</div>
<div> movu m6, r4m</div></div><div><br></div><div><br></div><div>This patch above makes x264 work on my Atom N270 netbook. </div><div>Some comments from x264 developers will be appreciated. Can submit a patch but do not know how to do this.</div>
<div><br></div><div><br></div><div><br></div>