Move libcds 1.6.0 from SVN
[libcds.git] / cds / compiler / bitop.h
1 //$$CDS-header$$
2
3 #ifndef __CDS_COMPILER_BITOP_H
4 #define __CDS_COMPILER_BITOP_H
5
6 // Choose appropriate header for current architecture and compiler
7
8 #if CDS_COMPILER == CDS_COMPILER_MSVC || (CDS_COMPILER == CDS_COMPILER_INTEL && CDS_OS_INTERFACE == CDS_OSI_WINDOWS)
9 /************************************************************************/
10 /* MS Visual C++                                                        */
11 /************************************************************************/
12
13 #    if CDS_PROCESSOR_ARCH == CDS_PROCESSOR_X86
14 #        include <cds/compiler/vc/x86/bitop.h>
15 #   elif CDS_PROCESSOR_ARCH == CDS_PROCESSOR_AMD64
16 #        include <cds/compiler/vc/amd64/bitop.h>
17 #    endif
18
19 #elif CDS_COMPILER == CDS_COMPILER_GCC || CDS_COMPILER == CDS_COMPILER_CLANG || CDS_COMPILER == CDS_COMPILER_INTEL
20 /************************************************************************/
21 /* GCC                                                                  */
22 /************************************************************************/
23
24 #    if CDS_PROCESSOR_ARCH == CDS_PROCESSOR_X86
25 #       include <cds/compiler/gcc/x86/bitop.h>
26 #    elif CDS_PROCESSOR_ARCH == CDS_PROCESSOR_AMD64
27 #       include <cds/compiler/gcc/amd64/bitop.h>
28 #    elif CDS_PROCESSOR_ARCH == CDS_PROCESSOR_SPARC
29 #       include <cds/compiler/gcc/sparc/bitop.h>
30 #    elif CDS_PROCESSOR_ARCH == CDS_PROCESSOR_IA64
31 #       include <cds/compiler/gcc/ia64/bitop.h>
32 #    elif CDS_PROCESSOR_ARCH == CDS_PROCESSOR_PPC64
33 #       include <cds/compiler/gcc/ppc64/bitop.h>
34 #   endif
35 #endif  // Compiler choice
36
37 // Generic (C) implementation
38 #include <cds/details/bitop_generic.h>
39
40 #endif    // #ifndef __CDS_COMPILER_BITOP_H