mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2025-02-13 16:40:27 +00:00
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>
This commit is contained in:
parent
7238265052
commit
180d43bc67
2
configure
vendored
2
configure
vendored
@ -1084,6 +1084,7 @@ HAVE_LIST="
|
|||||||
closesocket
|
closesocket
|
||||||
cmov
|
cmov
|
||||||
cpuid
|
cpuid
|
||||||
|
cpunop
|
||||||
dcbzl
|
dcbzl
|
||||||
dev_bktr_ioctl_bt848_h
|
dev_bktr_ioctl_bt848_h
|
||||||
dev_bktr_ioctl_meteor_h
|
dev_bktr_ioctl_meteor_h
|
||||||
@ -2889,6 +2890,7 @@ EOF
|
|||||||
die "yasm not found, use --disable-yasm for a crippled build"
|
die "yasm not found, use --disable-yasm for a crippled build"
|
||||||
check_yasm "vextractf128 xmm0, ymm0, 0" || disable avx
|
check_yasm "vextractf128 xmm0, ymm0, 0" || disable avx
|
||||||
check_yasm "vfmaddps ymm0, ymm1, ymm2, ymm3" || disable fma4
|
check_yasm "vfmaddps ymm0, ymm1, ymm2, ymm3" || disable fma4
|
||||||
|
check_yasm "CPU amdnop" && enable cpunop
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$cpu" in
|
case "$cpu" in
|
||||||
|
@ -91,8 +91,14 @@
|
|||||||
default rel
|
default rel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%macro CPUNOP 1
|
||||||
|
%if HAVE_CPUNOP
|
||||||
|
CPU %1
|
||||||
|
%endif
|
||||||
|
%endmacro
|
||||||
|
|
||||||
; Always use long nops (reduces 0x90 spam in disassembly on x86_32)
|
; 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:
|
; Macros to eliminate most code duplication between x86_32 and x86_64:
|
||||||
; Currently this works only for leaf functions which load all their arguments
|
; 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.
|
; 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.
|
; You shouldn't need to invoke this macro directly, it's a subroutine for INIT_MMX &co.
|
||||||
%macro INIT_CPUFLAGS 0-2
|
%macro INIT_CPUFLAGS 0-2
|
||||||
CPU amdnop
|
CPUNOP amdnop
|
||||||
%if %0 >= 1
|
%if %0 >= 1
|
||||||
%xdefine cpuname %1
|
%xdefine cpuname %1
|
||||||
%assign cpuflags cpuflags_%1
|
%assign cpuflags cpuflags_%1
|
||||||
@ -612,7 +618,7 @@ SECTION .note.GNU-stack noalloc noexec nowrite progbits
|
|||||||
%define movu lddqu
|
%define movu lddqu
|
||||||
%endif
|
%endif
|
||||||
%if notcpuflag(mmx2)
|
%if notcpuflag(mmx2)
|
||||||
CPU basicnop
|
CPUNOP basicnop
|
||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%xdefine SUFFIX
|
%xdefine SUFFIX
|
||||||
|
Loading…
x
Reference in New Issue
Block a user