fft-test: Remove possibility of returning restricted exit code
[libav.git] / libavutil / x86 / cpu.h
CommitLineData
f82c4fb2
DB
1/*
2 * This file is part of Libav.
3 *
4 * Libav is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * Libav is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with Libav; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19#ifndef AVUTIL_X86_CPU_H
20#define AVUTIL_X86_CPU_H
21
22#include "config.h"
23#include "libavutil/cpu.h"
8410d6e9 24#include "libavutil/cpu_internal.h"
f82c4fb2
DB
25
26#define AV_CPU_FLAG_AMD3DNOW AV_CPU_FLAG_3DNOW
27#define AV_CPU_FLAG_AMD3DNOWEXT AV_CPU_FLAG_3DNOWEXT
28
79aec43c
DB
29#define X86_AMD3DNOW(flags) CPUEXT(flags, AMD3DNOW)
30#define X86_AMD3DNOWEXT(flags) CPUEXT(flags, AMD3DNOWEXT)
31#define X86_MMX(flags) CPUEXT(flags, MMX)
32#define X86_MMXEXT(flags) CPUEXT(flags, MMXEXT)
33#define X86_SSE(flags) CPUEXT(flags, SSE)
34#define X86_SSE2(flags) CPUEXT(flags, SSE2)
35#define X86_SSE3(flags) CPUEXT(flags, SSE3)
36#define X86_SSSE3(flags) CPUEXT(flags, SSSE3)
37#define X86_SSE4(flags) CPUEXT(flags, SSE4)
38#define X86_SSE42(flags) CPUEXT(flags, SSE42)
39#define X86_AVX(flags) CPUEXT(flags, AVX)
40#define X86_FMA4(flags) CPUEXT(flags, FMA4)
41
8410d6e9
DB
42#define EXTERNAL_AMD3DNOW(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, AMD3DNOW)
43#define EXTERNAL_AMD3DNOWEXT(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, AMD3DNOWEXT)
44#define EXTERNAL_MMX(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, MMX)
45#define EXTERNAL_MMXEXT(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, MMXEXT)
46#define EXTERNAL_SSE(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, SSE)
47#define EXTERNAL_SSE2(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, SSE2)
48#define EXTERNAL_SSE3(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, SSE3)
49#define EXTERNAL_SSSE3(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, SSSE3)
50#define EXTERNAL_SSE4(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, SSE4)
51#define EXTERNAL_SSE42(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, SSE42)
52#define EXTERNAL_AVX(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, AVX)
53#define EXTERNAL_FMA4(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, FMA4)
54
55#define INLINE_AMD3DNOW(flags) CPUEXT_SUFFIX(flags, _INLINE, AMD3DNOW)
56#define INLINE_AMD3DNOWEXT(flags) CPUEXT_SUFFIX(flags, _INLINE, AMD3DNOWEXT)
57#define INLINE_MMX(flags) CPUEXT_SUFFIX(flags, _INLINE, MMX)
58#define INLINE_MMXEXT(flags) CPUEXT_SUFFIX(flags, _INLINE, MMXEXT)
59#define INLINE_SSE(flags) CPUEXT_SUFFIX(flags, _INLINE, SSE)
60#define INLINE_SSE2(flags) CPUEXT_SUFFIX(flags, _INLINE, SSE2)
61#define INLINE_SSE3(flags) CPUEXT_SUFFIX(flags, _INLINE, SSE3)
62#define INLINE_SSSE3(flags) CPUEXT_SUFFIX(flags, _INLINE, SSSE3)
63#define INLINE_SSE4(flags) CPUEXT_SUFFIX(flags, _INLINE, SSE4)
64#define INLINE_SSE42(flags) CPUEXT_SUFFIX(flags, _INLINE, SSE42)
65#define INLINE_AVX(flags) CPUEXT_SUFFIX(flags, _INLINE, AVX)
66#define INLINE_FMA4(flags) CPUEXT_SUFFIX(flags, _INLINE, FMA4)
f82c4fb2 67
1f6d8699
DB
68void ff_cpu_cpuid(int index, int *eax, int *ebx, int *ecx, int *edx);
69void ff_cpu_xgetbv(int op, int *eax, int *edx);
70int ff_cpu_cpuid_test(void);
71
f82c4fb2 72#endif /* AVUTIL_X86_CPU_H */