summaryrefslogtreecommitdiff
path: root/doc/optimization.txt
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2016-10-13 18:33:15 +0000
committerJames Almer <jamrial@gmail.com>2017-06-21 17:00:30 -0300
commit4f9297ac3b39098547863d28fbc8d2a906d5be49 (patch)
tree4672f09581a1a0e60b774e24f1f61457f5e69b0c /doc/optimization.txt
parent3cc73d3d6d2a98cd0da3deda90760729c82cdeeb (diff)
build: Prefer NASM assembler over YASM
NASM is more actively maintained and permits generating dependency information as a sideeffect of assembling, thus cutting build times in half. (Cherry-picked from libav commit 57b753b445e23363c997a8ec1c556e0b0f6e9da3) Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'doc/optimization.txt')
-rw-r--r--doc/optimization.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/optimization.txt b/doc/optimization.txt
index c39e1e37b9..974e2f9af2 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").
@@ -199,12 +199,12 @@ actual lines causing issues.
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 FFmpeg. 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