[FFmpeg-devel] Various build errors with armasm64 and armasm after update to FFmpeg 4.2

Lukas Fellechner lukas.fellechner at gmx.net
Tue Oct 1 23:07:47 EEST 2019


Hi there,

TL;DR: 

Lots of compile errors when building FFmpeg 4.2 ARM/NEON Code through gas-preprocessor and armasm(64). Build target is Windows (UWP) ARM and ARM64. X86 and X64 targets are building fine.

Long Version:

I am building FFmpeg with an MSYS2 environment where ARM/NEON assembly code is compiled through gas-preprocessor and armasm/armasm64, similar to how it is described in this compilation guide: https://trac.ffmpeg.org/wiki/CompilationGuide/WinRT.

This has worked very well for quite a long time. But after upgrading to FFmpeg 4.2, the build fails. A lot of changes and additions have been done for ARM/NEON 64-bit, and it looks like many of them are not compatible with armasm64. First I had to fix gas-preprocessor, a patch has been submitted today. But now, many other errors occur, which have to do with the ARM64 assembly code itself. I don’t have any knowledge of ARM/NEON assembly code, so I cannot help much with the investigation or fixes.

It would be great if ARM/NEON experts here (possibly those who submitted the changes) could check the new assembly codes and fix them, so that also armasm64 will eat it.

On ARM platform, I also see build errors. Interestingly, those files have not even changed. Only the referenced file libavutil/arm/asm.S has changed. Even when I undo the last changes there, the build still fails, so I am out of ideas here right now. When I switch back to FFmpeg 4.1.4, everything builds fine. Maybe there is a config change which causes those errors?

Below I will post build errors that I see on ARM and ARM64 builds. Other files could be affected as well (build cancels out after a few errors).

Thank you for your help.

Best Regards
Lukas


Errors with ARM64 target:

C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(29) : error A2523: operand 5: Wrong size operand
        ld1 {v0.4h - v3.4h}, [x1]
CC      libavcodec/aasc.o
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(97) : error A2523: operand 5: Wrong size operand
        ld1 {v0.8b - v3.8b}, [x1]
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(1972) : error A2509: operand 3: Illegal reg field
        ld1 {v1.1d - v2.1d}, [x2], x3
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(1973) : error A2509: operand 3: Illegal reg field
        ld1 {v3.1d - v4.1d}, [x2], x3
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(1974) : error A2509: operand 3: Illegal reg field
        ld1 {v16.1d - v17.1d}, [x2], x3
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(1975) : error A2509: operand 3: Illegal reg field
        ld1 {v18.1d - v19.1d}, [x2], x3
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(1976) : error A2509: operand 3: Illegal reg field
        ld1 {v20.1d - v21.1d}, [x2], x3
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(1977) : error A2509: operand 3: Illegal reg field
        ld1 {v22.1d - v23.1d}, [x2], x3
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(1978) : error A2509: operand 3: Illegal reg field
        ld1 {v24.1d - v25.1d}, [x2]
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(2032) : error A2509: operand 3: Illegal reg field
        st1 {v1.1d - v2.1d}, [x0], x1
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(2033) : error A2509: aasc.c
operand 3: Illegal reg field
        st1 {v3.1d - v4.1d}, [x0], x1
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(2183) : error A2506: operand 6: Not enough operands
        ld1 {v1.8b - v4.8b}, [x7], #32
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(2184) : error A2506: operand 6: Not enough operands
        ld1 {v16.8b - v19.8b}, [x7], #32
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(2185) : error A2506: operand 6: Not enough operands
        ld1 {v20.8b - v23.8b}, [x7], #32
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(2186) : error A2509: operand 3: Illegal reg field
        ld1 {v24.8b - v25.8b}, [x7]
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(2432) : error A2506: operand 6: Not enough operands
        ld1 {v1.8b - v4.8b}, [x7], #32
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(2433) : error A2509: operand 4: Illegal reg field
        ld1 {v5.8b - v7.8b}, [x7]
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(2630) : error A2506: operand 6: Not enough operands
        ld1 {v1.8b - v4.8b}, [x7], #32
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(2631) : error A2509: operand 4: Illegal reg field
        ld1 {v5.8b - v7.8b}, [x7]
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(2729) : error A2509: operand 3: Illegal reg field
        ld1 {v1.8b - v2.8b}, [x7], #16
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(2730) : error A2509: operand 4: Illegal reg field
        ld1 {v3.8b - v5.8b}, [x7]
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(2824) : error A2509: operand 3: Illegal reg field
        ld1 {v1.8b - v2.8b}, [x7], #16
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(2825) : error A2509: operand 4: Illegal reg field
        ld1 {v3.8b - v5.8b}, [x7]
Error running assembler at /usr/bin/gas-preprocessor.pl line 1175.



Errors with ARM target (32 bit):

C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM\libavcodec\arm\ac3dsp_arm.o.asm(72) : error A2173: syntax error in expression
        it gt
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM\libavcodec\arm\ac3dsp_arm.o.asm(72) : error A2212: The given operands are invalid for this instruction
        it gt
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM\libavcodec\arm\ac3dsp_armv6.o.asm(103) : error A2173: syntax error in expression
        it lt
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM\libavcodec\arm\ac3dsp_armv6.o.asm(103) : error A2212: Error running assembler at /usr/bin/gas-preprocessor.pl line 1175.The given operands are invalid for this instruction
        it lt
        ite gt
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM\libavcodec\arm\ac3dsp_armv6.o.asm(107) : error A2212: The given operands are invalid for this instruction
        ite gt
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM\libavcodec\arm\aacpsdsp_neon.o.asm(341) : error A2173: syntax error in expression
        it lt
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM\libavcodec\arm\aacpsdsp_neon.o.asm(341) : error A2212: The given operands are invalid for this instruction
        it lt
CC      libavcodec/arbc.o
Error running assembler at /usr/bin/gas-preprocessor.pl line 1175.
make: *** [/c/Source/FFmpegInterop-lukasf/ffmpeg/ffbuild/common.mak:71: libavcodec/arm/ac3dsp_arm.o] Fehler 1
make: *** Es wird auf noch nicht beendete Prozesse gewartet....
Error running assembler at /usr/bin/gas-preprocessor.pl line 1175.
make: *** [/c/Source/FFmpegInterop-lukasf/ffmpeg/ffbuild/common.mak:71: libavcodec/arm/ac3dsp_armv6.o] Fehler 1
make: *** [/c/Source/FFmpegInterop-lukasf/ffmpeg/ffbuild/common.mak:71: libavcodec/arm/aacpsdsp_neon.o] Fehler 1
arbc.c
CC      libavcodec/arm/ac3dsp_init_arm.o
ac3dsp_init_arm.c
AS      libavcodec/arm/ac3dsp_neon.o
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM\libavcodec\arm\ac3dsp_neon.o.asm(92) : error A2173: syntax error in expression
        it eq
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM\libavcodec\arm\ac3dsp_neon.o.asm(92) : error A2212: The given operands are invalid for this instruction
        it eq
Error running assembler at /usr/bin/gas-preprocessor.pl line 1175.
make: *** [/c/Source/FFmpegInterop-lukasf/ffmpeg/ffbuild/common.mak:71: libavcodec/arm/ac3dsp_neon.o] Fehler 1
AS      libavcodec/arm/aacpsdsp_neon.o
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM\libavcodec\arm\aacpsdsp_neon.o.asm(341) : error A2173: syntax error in expression
        it lt
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM\libavcodec\arm\aacpsdsp_neon.o.asm(341) : error A2212: The given operands are invalid for this instruction
        it lt
Error running assembler at /usr/bin/gas-preprocessor.pl line 1175.
make: *** [/c/Source/FFmpegInterop-lukasf/ffmpeg/ffbuild/common.mak:71: libavcodec/arm/aacpsdsp_neon.o] Fehler 1





More information about the ffmpeg-devel mailing list