NASM is more actively maintained and permits generating dependency information
as a sideeffect of assembling, thus cutting build times in half.
---
Updated the documentation to reflect that nasm is now preferred over yasm.
.travis.yml | 4 ++--
configure | 14 +++++++-------
doc/optimization.txt | 8 ++++----
doc/platform.texi | 12 ++++++------
4 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 8e9629a..6f9647a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,7 +6,7 @@ os:
addons:
apt:
packages:
- - yasm
+ - nasm
- diffutils
compiler:
- clang
@@ -17,7 +17,7 @@ cache:
before_install:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update --all; fi
install:
- - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install yasm; fi
+ - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install nasm; fi
script:
- mkdir -p libav-samples
- ./configure --samples=libav-samples --cc=$CC
diff --git a/configure b/configure
index 4780600..930232a 100755
--- a/configure
+++ b/configure
@@ -2550,7 +2550,6 @@ pkg_config_default=pkg-config
ranlib="ranlib"
strip="strip"
version_script='--version-script'
-asmexe="yasm"
# machine
arch_default=$(uname -m)
@@ -4434,15 +4433,16 @@ EOF
enabled mmxext && check_inline_asm mmxext_inline '"pmaxub %mm0, %mm1"'
if ! disabled_any asm mmx assembler; then
- if check_cmd $asmexe --version; then
- enabled x86_64 && asm_extra="-m amd64"
- asm_debug="-g dwarf2"
- ASMDEP='$(DEPASM) $(ASMFLAGS) -M -o $@ $< > $(@:.o=.d)'
- elif check_cmd nasm -v; then
+ if check_cmd nasm -v; then
asmexe=nasm
asm_debug="-g -F dwarf"
ASM_DEPFLAGS='-MD $(@:.o=.d)'
enabled x86_64 && test "$objformat" = elf && objformat=elf64
+ elif check_cmd yasm --version; then
+ asmexe=yasm
+ enabled x86_64 && asm_extra="-m amd64"
+ asm_debug="-g dwarf2"
+ ASMDEP='$(DEPASM) $(ASMFLAGS) -M -o $@ $< > $(@:.o=.d)'
fi
ASMFLAGS="-f $objformat $asm_extra"
@@ -4453,7 +4453,7 @@ EOF
esac
check_asm "movbe ecx, [5]" && enable assembler ||
- die "yasm/nasm not found or too old. Use --disable-assembler for a
crippled build."
+ die "nasm/yasm not found or too old. Use --disable-assembler for a
crippled build."
check_asm "vextracti128 xmm0, ymm0, 0" || disable avx2_external
check_asm "vpmacsdd xmm0, xmm1, xmm2, xmm3" || disable xop_external
check_asm "vfmadd132ps ymm0, ymm1, ymm2" || disable fma3_external
diff --git a/doc/optimization.txt b/doc/optimization.txt
index be12d85..3277b9b 100644
--- a/doc/optimization.txt
+++ b/doc/optimization.txt
@@ -161,8 +161,8 @@ do{
For x86, mark registers that are clobbered in your asm. This means both
general x86 registers (e.g. eax) as well as XMM registers. This last one is
particularly important on Win64, where xmm6-15 are callee-save, and not
-restoring their contents leads to undefined results. In external asm (e.g.
-yasm), you do this by using:
+restoring their contents leads to undefined results. In external asm,
+you do this by using:
cglobal function_name, num_args, num_regs, num_xmm_regs
In inline asm, you specify clobbered registers at the end of your asm:
__asm__(".." ::: "%eax").
@@ -194,12 +194,12 @@ The latter requires a good optimizing compiler which gcc
is not.
Inline asm vs. external asm
---------------------------
Both inline asm (__asm__("..") in a .c file, handled by a compiler such as gcc)
-and external asm (.s or .asm files, handled by an assembler such as yasm/nasm)
+and external asm (.s or .asm files, handled by an assembler such as nasm/yasm)
are accepted in Libav. Which one to use differs per specific case.
- if your code is intended to be inlined in a C function, inline asm is always
better, because external asm cannot be inlined
-- if your code calls external functions, yasm is always better
+- if your code calls external functions, external asm is always better
- if your code takes huge and complex structs as function arguments (e.g.
MpegEncContext; note that this is not ideal and is discouraged if there
are alternatives), then inline asm is always better, because predicting
diff --git a/doc/platform.texi b/doc/platform.texi
index 74b014e..dc20d67 100644
--- a/doc/platform.texi
+++ b/doc/platform.texi
@@ -69,9 +69,9 @@ OS X on PowerPC or ARM (iPhone) requires a preprocessor from
assembly functions. Put the Perl script somewhere
in your PATH, Libav's configure will pick it up automatically.
-OS X on AMD64 and x86 requires @command{yasm} to build most of the
+OS X on AMD64 and x86 requires @command{nasm} to build most of the
optimized assembly functions @url{http://mxcl.github.com/homebrew/, Homebrew},
-@url{http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-macos.xml,
Gentoo Prefix}
+@url{https://wiki.gentoo.org/wiki/Project:Prefix, Gentoo Prefix}
or @url{http://www.macports.org, MacPorts} can easily provide it.
@@ -134,7 +134,7 @@ them under @command{MinGW-w64 Win64 Shell} and
@command{MinGW-w64 Win32 Shell}.
pacman -S make pkgconf diffutils
# mingw-w64 packages and toolchains
-pacman -S mingw-w64-x86_64-yasm mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL
+pacman -S mingw-w64-x86_64-nasm mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL
@end example
To target 32 bits replace @code{x86_64} with @code{i686} in the command above.
@@ -152,14 +152,14 @@ You will need the following prerequisites:
@item @uref{http://code.google.com/p/msinttypes/, msinttypes}
(if using MSVC 2012 or earlier)
@item @uref{http://msys2.github.io/, MSYS2}
-@item @uref{http://yasm.tortall.net/, YASM}
+@item @uref{http://www.nasm.us/, NASM}
(Also available via MSYS2's package manager.)
@end itemize
To set up a proper environment in MSYS2, you need to run @code{msys_shell.bat}
from
the Visual Studio or Intel Compiler command prompt.
-Place @code{yasm.exe} somewhere in your @code{PATH}. If using MSVC 2012 or
+Place @code{nasm.exe} somewhere in your @code{PATH}. If using MSVC 2012 or
earlier, place @code{c99wrap.exe} and @code{c99conv.exe} somewhere in your
@code{PATH} as well.
@@ -307,7 +307,7 @@ These library packages are only available from
@uref{http://sourceware.org/cygwinports/, Cygwin Ports}:
@example
-yasm, libSDL-devel, libfaac-devel, libgsm-devel, libmp3lame-devel,
+nasm, libSDL-devel, libfaac-devel, libgsm-devel, libmp3lame-devel,
libschroedinger1.0-devel, speex-devel, libtheora-devel, libxvidcore-devel
@end example
--
2.1.4
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel