[x264-devel] Windows x64 support

BugMaster BugMaster at narod.ru
Mon Dec 8 23:56:49 CET 2008


On Mon, 8 Dec 2008 14:34:42 -0800, Jason Garrett-Glaser wrote:
>> There is no a lot of problems with MSVC (in Windows x64 it even keep
>> 16 byte stack alignment ;) ) and have good debugger for quick finding
>> the places of crash. And with mingw-w64 I even don't found how to
>> properly configure it to compile x264. The most problems was with
>> adaptation of "checkasm" for compiling in MSVC (for quick testing
>> assembler optimizations).
>> As for backing up xmm6-xmm16 I suggest to use movdqu.

> Movdqu is way too slow.  Fortunately, I'm pretty sure that the x64 ABI
> requires stack alignment (I sure hope it does; Linux's certainly
> does).  If it does it also means we can get rid of the MOD4_STACK when
> compiling with MSVC on 64-bit.

I mean movdqa of course.
Yes, x64 ABI requires 16 byte stack alignment. As for MOD4_STACK it is
already don't used for x64:

#if !defined(_WIN64) && !defined(__LP64__)
#if defined(_MSC_VER) || defined(__INTEL_COMPILER)
#define BROKEN_STACK_ALIGNMENT /* define it if stack is not mod16 */
#endif
#endif

>>> Along with this, you'll want to reorganize register usage so that in
>>> functions using (for example) only 5 registers, xmm6/7 aren't used.
>>
>> I am trying to make as small as possible changes in code so I don't
>> think I would reorganize register usage because this would probably
>> cause the full rewrite of this assembler functions.

> Nah, only a few find/replace cases with a couple functions.

Replace with what? With variables (in stack)?



More information about the x264-devel mailing list