On 05/15/11 06:20 am, Diego Biurrun wrote:
So we test for and appear to support nasm, but nasm fails to build
libavcodec/x86/fft_mmx.asm:
$ make -k V=1
nasm -f win32 -DPREFIX -I. -I"/home/diego/src/libav" -Pconfig.asm -I
libavcodec/x86/ -M -o libavcodec/x86/fft_mmx.o libavcodec/x86/fft_mmx.asm>
libavcodec/x86/fft_mmx.d
nasm -f win32 -DPREFIX -I. -I"/home/diego/src/libav" -Pconfig.asm -I
libavcodec/x86/ -o libavcodec/x86/fft_mmx.o libavcodec/x86/fft_mmx.asm
libavcodec/x86/fft_mmx.asm:339: error: invalid combination of opcode and
operands
[...]
There are many more similar errors that I skipped pasting here.
This is a paste from Cygwin, but the same error appears on Linux.
Can somebody fix this? Is nasm support worth keeping in the
first place?
You need to update your nasm binary as it assembles fine here with the
latest daily and appears to have been fixed in March.
(http://permalink.gmane.org/gmane.comp.lang.nasm.cvs/2465)
Yasm does not support a.out or OMF which OS/2 uses so I use nasm with
the attached patch.
Dave
diff --git a/configure b/configure
old mode 100755
new mode 100644
index d6a5d69..8077253
--- a/configure
+++ b/configure
@@ -2466,6 +2466,7 @@ case $target_os in
;;
os/2*)
ln_s="cp -f"
+ objformat="aout"
add_ldflags -Zomf -Zbin-files -Zargs-wild -Zmap
SHFLAGS='$(SUBDIR)$(NAME).def -Zdll -Zomf'
FFSERVERLDFLAGS=""
diff --git a/libavcodec/x86/dsputil_yasm.asm b/libavcodec/x86/dsputil_yasm.asm
index 15f626e..8b19cc1 100644
--- a/libavcodec/x86/dsputil_yasm.asm
+++ b/libavcodec/x86/dsputil_yasm.asm
@@ -30,7 +30,7 @@ pb_zz11zz55zz99zzdd: db -1,-1,1,1,-1,-1,5,5,-1,-1,9,9,-1,-1,13,13
pb_revwords: db 14, 15, 12, 13, 10, 11, 8, 9, 6, 7, 4, 5, 2, 3, 0, 1
pd_16384: times 4 dd 16384
-section .text align=16
+SECTION_TEXT
%macro SCALARPRODUCT 1
; int scalarproduct_int16(int16_t *v1, int16_t *v2, int order, int shift)
diff --git a/libavcodec/x86/fft_mmx.asm b/libavcodec/x86/fft_mmx.asm
index fc5cb98..bd2e829 100644
--- a/libavcodec/x86/fft_mmx.asm
+++ b/libavcodec/x86/fft_mmx.asm
@@ -85,7 +85,7 @@ cextern cos_ %+ i
%1
%endmacro
-section .text align=16
+SECTION_TEXT
%macro T2_3DN 4 ; z0, z1, mem0, mem1
mova %1, %3
diff --git a/libavcodec/x86/fmtconvert.asm b/libavcodec/x86/fmtconvert.asm
index 5cd8f6c..a4106ec 100644
--- a/libavcodec/x86/fmtconvert.asm
+++ b/libavcodec/x86/fmtconvert.asm
@@ -21,7 +21,7 @@
%include "x86inc.asm"
-section .text align=16
+SECTION_TEXT
%macro PSWAPD_SSE 2
pshufw %1, %2, 0x4e
diff --git a/libavcodec/x86/x86inc.asm b/libavcodec/x86/x86inc.asm
index 53091c1..c84d556 100644
--- a/libavcodec/x86/x86inc.asm
+++ b/libavcodec/x86/x86inc.asm
@@ -63,11 +63,22 @@
%elifidn __OUTPUT_FORMAT__,macho
SECTION .text align=%1
fakegot:
+ %elifidn __OUTPUT_FORMAT__,aout
+ section .text
%else
SECTION .rodata align=%1
%endif
%endmacro
+; aout does not support align=
+%macro SECTION_TEXT 0-1 16
+ %ifidn __OUTPUT_FORMAT__,aout
+ SECTION .text
+ %else
+ SECTION .text align=%1
+ %endif
+%endmacro
+
%ifdef WIN64
%define PIC
%elifndef ARCH_X86_64
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel