[FFmpeg-devel] failed to compile swscale_template.c under x86_64-w64-mingw32

zhou drangon drangon.zhou
Fri Jan 1 07:35:31 CET 2010


hi,

I try to cross compile ffmpeg svn trunk using x86_64-w64-mingw32
toolchain, and got the following error :

swscale.s: Assembler messages:
swscale.s:15700: Error: suffix or operands invalid for `cmp'

the temp generated asm code is :

 # 2479 "/compile/mingw-w64-dgn/lib_source/ffmpeg/libswscale/swscale_template.c"
1
    xor %rax, %rax
    xor %rdx, %rdx
    xorl    %ecx, %ecx
    .align 1 << 4
    1:
    mov        104(%rsp), %rsi
    movzbl  (%rsi, %rdx), %edi
    movzbl 1(%rsi, %rdx), %esi
    subl    %edi, %esi
    imull   %ecx, %esi
    shll      $16, %edi
    addl    %edi, %esi
    mov        88(%rsp), %rdi
    shrl       $9, %esi
    movw     %si, (%rdi, %rax, 2)
    movzbl    (%r9, %rdx), %edi
    movzbl   1(%r9, %rdx), %esi
    subl    %edi, %esi
    imull   %ecx, %esi
    shll      $16, %edi
    addl    %edi, %esi
    mov        88(%rsp), %rdi
    shrl       $9, %esi
    movw     %si, (5120*2)(%rdi, %rax, 2)
    addw       46(%rsp), %cx
    adc        (%rsp), %rdx
    add        $1, %rax
    cmp        %r8d, %rax              # **** this line cause error
     jb        1b

it seems that this is caused by "g" (dstWidth), when dstWidth 's type
is long which is 4bytes under windows.

-- 
regards,

drangon
-------------------------
homepage : http://www.drangon.org/
mingw stuff : http://www.drangon.org/mingw/
mingw stuff 2 : http://code.google.com/p/mingw-w64-dgn/
-------------------------



More information about the ffmpeg-devel mailing list