[x264-devel] Windows x64 support

Jason Garrett-Glaser darkshikari at gmail.com
Mon Dec 8 23:34:42 CET 2008


> 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.

>> 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.

> I would prefer to
> back up nonvolatile registers in stack (may be in PROLOGUE macro but
> this would require adding of additional parameter to it).

Yes, you'd need an addition parameter--in which case you'll have to go
through every asm function anyways.

Dark Shikari


More information about the x264-devel mailing list