summaryrefslogtreecommitdiff
path: root/doc/optimization.txt
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2015-02-08 12:18:27 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-17 13:08:04 +0100
commitbc8e044d8c3277958c920091412b77d4e7411d96 (patch)
tree61173f1e201e5e458cd1d1a8c4353cdf1b0f8eea /doc/optimization.txt
parentd9293c776ed9129acaf3d41fb727380c293dc943 (diff)
x86/doc/Makefile: DBG=1 to preprocess external asm
The macro hell sometimes make it difficult to trace the source of an error, so it is easier to analyze the preprocessed output. This patch makes this automatical by specifying DBG=1 on the command line: a file ffmpeg/dir/file.asm gets preprocessed to builddir/dir/file.dbg.asm, which is then compiled. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'doc/optimization.txt')
-rw-r--r--doc/optimization.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/optimization.txt b/doc/optimization.txt
index 94a4277326..1a0b98cd0e 100644
--- a/doc/optimization.txt
+++ b/doc/optimization.txt
@@ -191,6 +191,11 @@ __asm__() block.
Use external asm (nasm/yasm) or inline asm (__asm__()), do not use intrinsics.
The latter requires a good optimizing compiler which gcc is not.
+When debugging a x86 external asm compilation issue, if lost in the macro
+expansions, add DBG=1 to your make command-line: the input file will be
+preprocessed, stripped of the debug/empty lines, then compiled, showing the
+actual lines causing issues.
+
Inline asm vs. external asm
---------------------------
Both inline asm (__asm__("..") in a .c file, handled by a compiler such as gcc)