diff options
author | Mans Rullgard <mans@mansr.com> | 2012-08-06 00:34:51 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-08-07 15:22:20 +0100 |
commit | 180d43bc67cec071c5a0f4807aa66f7b6242edc1 (patch) | |
tree | cf8ac631f85d3fdc6940d0bd85b5a6821894f4e8 /libavutil/x86 | |
parent | 7238265052d3b7ec1aa61d6ddc72aa1910c22725 (diff) | |
download | ffmpeg-180d43bc67cec071c5a0f4807aa66f7b6242edc1.tar.gz |
x86: use nop cpu directives only if supported
nasm does not support 'CPU foonop' directives. This adds a configure
test for the directive and uses it only if supported.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavutil/x86')
-rw-r--r-- | libavutil/x86/x86inc.asm | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm index 86c406f1df..e729924631 100644 --- a/libavutil/x86/x86inc.asm +++ b/libavutil/x86/x86inc.asm @@ -91,8 +91,14 @@ default rel %endif +%macro CPUNOP 1 + %if HAVE_CPUNOP + CPU %1 + %endif +%endmacro + ; Always use long nops (reduces 0x90 spam in disassembly on x86_32) -CPU amdnop +CPUNOP amdnop ; Macros to eliminate most code duplication between x86_32 and x86_64: ; Currently this works only for leaf functions which load all their arguments @@ -589,7 +595,7 @@ SECTION .note.GNU-stack noalloc noexec nowrite progbits ; All subsequent functions (up to the next INIT_CPUFLAGS) is built for the specified cpu. ; You shouldn't need to invoke this macro directly, it's a subroutine for INIT_MMX &co. %macro INIT_CPUFLAGS 0-2 - CPU amdnop + CPUNOP amdnop %if %0 >= 1 %xdefine cpuname %1 %assign cpuflags cpuflags_%1 @@ -612,7 +618,7 @@ SECTION .note.GNU-stack noalloc noexec nowrite progbits %define movu lddqu %endif %if notcpuflag(mmx2) - CPU basicnop + CPUNOP basicnop %endif %else %xdefine SUFFIX |