diff options
Diffstat (limited to 'libavutil/x86')
-rw-r--r-- | libavutil/x86/bswap.h | 8 | ||||
-rw-r--r-- | libavutil/x86/cpu.c | 10 | ||||
-rw-r--r-- | libavutil/x86/intmath.h | 8 | ||||
-rw-r--r-- | libavutil/x86/intreadwrite.h | 8 | ||||
-rw-r--r-- | libavutil/x86/timer.h | 8 | ||||
-rw-r--r-- | libavutil/x86/x86inc.asm | 60 | ||||
-rw-r--r-- | libavutil/x86/x86util.asm | 8 |
7 files changed, 75 insertions, 35 deletions
diff --git a/libavutil/x86/bswap.h b/libavutil/x86/bswap.h index c6cf007c86..52ffb4dbf8 100644 --- a/libavutil/x86/bswap.h +++ b/libavutil/x86/bswap.h @@ -1,18 +1,18 @@ /* - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/libavutil/x86/cpu.c b/libavutil/x86/cpu.c index 2424fe4516..b53379bbd3 100644 --- a/libavutil/x86/cpu.c +++ b/libavutil/x86/cpu.c @@ -3,20 +3,20 @@ * (c)1997-99 by H. Dietz and R. Fisher * Converted to C and improved by Fabrice Bellard. * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -83,6 +83,8 @@ int ff_get_cpu_flags_x86(void) cpuid(1, eax, ebx, ecx, std_caps); family = ((eax>>8)&0xf) + ((eax>>20)&0xff); model = ((eax>>4)&0xf) + ((eax>>12)&0xf0); + if (std_caps & (1<<15)) + rval |= AV_CPU_FLAG_CMOV; if (std_caps & (1<<23)) rval |= AV_CPU_FLAG_MMX; if (std_caps & (1<<25)) diff --git a/libavutil/x86/intmath.h b/libavutil/x86/intmath.h index a7e82b1340..f3acddc0e3 100644 --- a/libavutil/x86/intmath.h +++ b/libavutil/x86/intmath.h @@ -1,20 +1,20 @@ /* * Copyright (c) 2010 Mans Rullgard <mans@mansr.com> * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/libavutil/x86/intreadwrite.h b/libavutil/x86/intreadwrite.h index 635096e569..4061d19231 100644 --- a/libavutil/x86/intreadwrite.h +++ b/libavutil/x86/intreadwrite.h @@ -1,20 +1,20 @@ /* * Copyright (c) 2010 Alexander Strange <astrange@ithinksw.com> * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/libavutil/x86/timer.h b/libavutil/x86/timer.h index 7f51816c5a..62a111fdd3 100644 --- a/libavutil/x86/timer.h +++ b/libavutil/x86/timer.h @@ -1,20 +1,20 @@ /* * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at> * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm index c167057921..971d210848 100644 --- a/libavutil/x86/x86inc.asm +++ b/libavutil/x86/x86inc.asm @@ -60,19 +60,38 @@ ; and x264's strides are all positive), but is not guaranteed by the ABI. ; Name of the .rodata section. -; Kludge: Something on OS X fails to align .rodata even given an align attribute, -; so use a different read-only section. %macro SECTION_RODATA 0-1 16 - %ifidn __OUTPUT_FORMAT__,macho64 - SECTION .text align=%1 - %elifidn __OUTPUT_FORMAT__,macho - SECTION .text align=%1 - fakegot: - %elifidn __OUTPUT_FORMAT__,aout + ; Kludge: Something on OS X fails to align .rodata even given an align + ; attribute, so use a different read-only section. This has been fixed in + ; yasm 0.8.0 and nasm 2.6. + %ifdef __YASM_VERSION_ID__ + %if __YASM_VERSION_ID__ < 00080000h + %define NEED_MACHO_RODATA_KLUDGE + %endif + %elifdef __NASM_VERSION_ID__ + %if __NASM_VERSION_ID__ < 02060000h + %define NEED_MACHO_RODATA_KLUDGE + %endif + %endif + + %ifidn __OUTPUT_FORMAT__,aout section .text %else - SECTION .rodata align=%1 + %ifndef NEED_MACHO_RODATA_KLUDGE + SECTION .rodata align=%1 + %else + %ifidn __OUTPUT_FORMAT__,macho64 + SECTION .text align=%1 + %elifidn __OUTPUT_FORMAT__,macho + SECTION .text align=%1 + fakegot: + %else + SECTION .rodata align=%1 + %endif + %endif %endif + + %undef NEED_MACHO_RODATA_KLUDGE %endmacro ; aout does not support align= @@ -97,7 +116,11 @@ %endif ; Always use long nops (reduces 0x90 spam in disassembly on x86_32) +; Not supported by NASM (except via smartalign package + ALIGNMODE k8, +; however that fails when used together with the -M option) +%ifdef __YASM_VER__ CPU amdnop +%endif ; Macros to eliminate most code duplication between x86_32 and x86_64: ; Currently this works only for leaf functions which load all their arguments @@ -142,10 +165,10 @@ CPU amdnop %define r%1mp %2 %elif ARCH_X86_64 ; memory %define r%1m [rsp + stack_offset + %6] - %define r%1mp qword r %+ %1m + %define r%1mp qword r %+ %1 %+ m %else %define r%1m [esp + stack_offset + %6] - %define r%1mp dword r %+ %1m + %define r%1mp dword r %+ %1 %+ m %endif %define r%1 %2 %endmacro @@ -488,9 +511,19 @@ DECLARE_ARG 7, 8, 9, 10, 11, 12, 13, 14 ; Appends cpuflags to the function name if cpuflags has been specified. %macro cglobal 1-2+ ; name, [PROLOGUE args] %if %0 == 1 + ; HACK: work around %+ broken with empty SUFFIX for nasm 2.09.10 + %ifndef cpuname + cglobal_internal %1 + %else cglobal_internal %1 %+ SUFFIX + %endif %else + ; HACK: work around %+ broken with empty SUFFIX for nasm 2.09.10 + %ifndef cpuname + cglobal_internal %1, %2 + %else cglobal_internal %1 %+ SUFFIX, %2 + %endif %endif %endmacro %macro cglobal_internal 1-2+ @@ -767,7 +800,12 @@ INIT_XMM ; Append cpuflags to the callee's name iff the appended name is known and the plain name isn't %macro call 1 + ; HACK: work around %+ broken with empty SUFFIX for nasm 2.09.10 + %ifndef cpuname + call_internal %1, %1 + %else call_internal %1, %1 %+ SUFFIX + %endif %endmacro %macro call_internal 2 %xdefine %%i %1 diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm index 55f4a936e2..8c8d4856e0 100644 --- a/libavutil/x86/x86util.asm +++ b/libavutil/x86/x86util.asm @@ -6,20 +6,20 @@ ;* Authors: Loren Merritt <lorenm@u.washington.edu> ;* Holger Lubitz <holger@lubitz.org> ;* -;* This file is part of Libav. +;* This file is part of FFmpeg. ;* -;* Libav is free software; you can redistribute it and/or +;* FFmpeg is free software; you can redistribute it and/or ;* modify it under the terms of the GNU Lesser General Public ;* License as published by the Free Software Foundation; either ;* version 2.1 of the License, or (at your option) any later version. ;* -;* Libav is distributed in the hope that it will be useful, +;* FFmpeg is distributed in the hope that it will be useful, ;* but WITHOUT ANY WARRANTY; without even the implied warranty of ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;* Lesser General Public License for more details. ;* ;* You should have received a copy of the GNU Lesser General Public -;* License along with Libav; if not, write to the Free Software +;* License along with FFmpeg; if not, write to the Free Software ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;****************************************************************************** |