libsidplayfp 2.15.0
siddefs-fp.h
1// ---------------------------------------------------------------------------
2// This file is part of reSID, a MOS6581 SID emulator engine.
3// Copyright (C) 1999 Dag Lem <resid@nimrod.no>
4//
5// This program is free software; you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation; either version 2 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18// ---------------------------------------------------------------------------
19
20#ifndef SIDDEFS_FP_H
21#define SIDDEFS_FP_H
22
23// Compilation configuration.
24#define RESID_BRANCH_HINTS 1
25
26// Compiler specifics.
27#define HAVE_BUILTIN_EXPECT 1
28
29// Branch prediction macros, lifted off the Linux kernel.
30#if RESID_BRANCH_HINTS && HAVE_BUILTIN_EXPECT
31# define likely(x) __builtin_expect(!!(x), 1)
32# define unlikely(x) __builtin_expect(!!(x), 0)
33#else
34# define likely(x) (x)
35# define unlikely(x) (x)
36#endif
37
38namespace reSIDfp {
39
40typedef enum { MOS6581=1, MOS8580 } ChipModel;
41
42typedef enum { AVERAGE=1, WEAK, STRONG } CombinedWaveforms;
43
44typedef enum { DECIMATE=1, RESAMPLE } SamplingMethod;
45}
46
47extern "C"
48{
49#ifndef __VERSION_CC__
50extern const char* residfp_version_string;
51#else
52const char* residfp_version_string = "2.15.0";
53#endif
54}
55
56// Inlining on/off.
57#define RESID_INLINING 1
58#define RESID_INLINE inline
59
60#endif // SIDDEFS_FP_H