1#ifndef foocpux86hfoo
2#define foocpux86hfoo
3
4/***
5  This file is part of PulseAudio.
6
7  Copyright 2004-2006 Lennart Poettering
8  Copyright 2009 Wim Taymans <wim.taymans@collabora.co.uk>
9
10  PulseAudio is free software; you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published
12  by the Free Software Foundation; either version 2.1 of the License,
13  or (at your option) any later version.
14
15  PulseAudio is distributed in the hope that it will be useful, but
16  WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  General Public License for more details.
19
20  You should have received a copy of the GNU Lesser General Public License
21  along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
22***/
23
24#include <stdint.h>
25#include <pulsecore/macro.h>
26
27typedef enum pa_cpu_x86_flag {
28    PA_CPU_X86_MMX       = (1 << 0),
29    PA_CPU_X86_MMXEXT    = (1 << 1),
30    PA_CPU_X86_SSE       = (1 << 2),
31    PA_CPU_X86_SSE2      = (1 << 3),
32    PA_CPU_X86_SSE3      = (1 << 4),
33    PA_CPU_X86_SSSE3     = (1 << 5),
34    PA_CPU_X86_SSE4_1    = (1 << 6),
35    PA_CPU_X86_SSE4_2    = (1 << 7),
36    PA_CPU_X86_3DNOW     = (1 << 8),
37    PA_CPU_X86_3DNOWEXT  = (1 << 9),
38    PA_CPU_X86_CMOV      = (1 << 10)
39} pa_cpu_x86_flag_t;
40
41void pa_cpu_get_x86_flags(pa_cpu_x86_flag_t *flags);
42bool pa_cpu_init_x86 (pa_cpu_x86_flag_t *flags);
43
44#if defined (__i386__)
45typedef int32_t pa_reg_x86;
46#elif defined (__amd64__)
47typedef int64_t pa_reg_x86;
48#endif
49
50/* some optimized functions */
51void pa_volume_func_init_mmx(pa_cpu_x86_flag_t flags);
52void pa_volume_func_init_sse(pa_cpu_x86_flag_t flags);
53
54void pa_remap_func_init_mmx(pa_cpu_x86_flag_t flags);
55void pa_remap_func_init_sse(pa_cpu_x86_flag_t flags);
56
57void pa_convert_func_init_sse (pa_cpu_x86_flag_t flags);
58
59#endif /* foocpux86hfoo */
60