[x264-devel] Windows x64 support

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


On Mon, 8 Dec 2008 13:53:49 -0800, Jason Garrett-Glaser wrote:
> On Mon, Dec 8, 2008 at 1:43 PM, BugMaster <BugMaster at narod.ru> wrote:
>> I am currently trying to adapt x264 assembler optimizations for
>> working in Windows x64. And want to know does it really needed by x264
>> developers or they have own plans on it (may be I am duplicating
>> their work which they make internally).

> Nope, your work is welcome.  I don't know of Loren doing anything either.

Then I hope to finish it at this week (or may be at the beginning of
the next).

>> - Debug build with MSVC 2008 works and produces the same encode as x86
>> build

> How do you intend to ever get this working with MSVC?  Backing up
> xmm6-xmm15 requires aligned stack alignment, using movdqu, or doing
> pointer math on esp, the latter two of which will certainly not be
> tolerated.

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.

> How do you intend to ever get this working with MSVC?  Backing up
> xmm6-xmm15 requires aligned stack alignment, using movdqu, or doing
> pointer math on esp, the latter two of which will certainly not be
> tolerated.

>> - Need to add backup/restore of nonvolatile XMM6-XMM15 registers where
>> they used;

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



More information about the x264-devel mailing list