1 #ifndef ARCH_H
2 #define ARCH_H
3
4 enum {
5 arch_x86_64 = 1,
6 arch_i386,
7 arch_ppc,
8 arch_ia64,
9 arch_s390,
10 arch_alpha,
11 arch_sparc,
12 arch_sparc64,
13 arch_arm,
14 arch_sh,
15 arch_hppa,
16 arch_mips,
17 arch_aarch64,
18
19 arch_generic,
20
21 arch_nr,
22 };
23
24 enum {
25 ARCH_FLAG_1 = 1 << 0,
26 ARCH_FLAG_2 = 1 << 1,
27 ARCH_FLAG_3 = 1 << 2,
28 ARCH_FLAG_4 = 1 << 3,
29 };
30
31 extern unsigned long arch_flags;
32
33 #define ARCH_CPU_CLOCK_WRAPS
34
35 #if defined(__i386__)
36 #include "arch-x86.h"
37 #elif defined(__x86_64__)
38 #include "arch-x86_64.h"
39 #elif defined(__powerpc__) || defined(__powerpc64__) || defined(__ppc__)
40 #include "arch-ppc.h"
41 #elif defined(__ia64__)
42 #include "arch-ia64.h"
43 #elif defined(__alpha__)
44 #include "arch-alpha.h"
45 #elif defined(__s390x__) || defined(__s390__)
46 #include "arch-s390.h"
47 #elif defined(__sparc__)
48 #include "arch-sparc.h"
49 #elif defined(__sparc64__)
50 #include "arch-sparc64.h"
51 #elif defined(__arm__)
52 #include "arch-arm.h"
53 #elif defined(__mips__) || defined(__mips64__)
54 #include "arch-mips.h"
55 #elif defined(__sh__)
56 #include "arch-sh.h"
57 #elif defined(__hppa__)
58 #include "arch-hppa.h"
59 #elif defined(__aarch64__)
60 #include "arch-aarch64.h"
61 #else
62 #warning "Unknown architecture, attempting to use generic model."
63 #include "arch-generic.h"
64 #endif
65
66 #ifdef ARCH_HAVE_FFZ
67 #define ffz(bitmask) arch_ffz(bitmask)
68 #else
69 #include "../lib/ffz.h"
70 #endif
71
72 #ifndef ARCH_HAVE_INIT
arch_init(char * envp[])73 static inline int arch_init(char *envp[])
74 {
75 return 0;
76 }
77 #endif
78
79 #endif
80