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
18 arch_generic,
19
20 arch_nr,
21 };
22
23 enum {
24 ARCH_FLAG_1 = 1 << 0,
25 ARCH_FLAG_2 = 1 << 1,
26 ARCH_FLAG_3 = 1 << 2,
27 ARCH_FLAG_4 = 1 << 3,
28 };
29
30 extern unsigned long arch_flags;
31
32 #if defined(__i386__)
33 #include "arch-x86.h"
34 #elif defined(__x86_64__)
35 #include "arch-x86_64.h"
36 #elif defined(__powerpc__) || defined(__powerpc64__) || defined(__ppc__)
37 #include "arch-ppc.h"
38 #elif defined(__ia64__)
39 #include "arch-ia64.h"
40 #elif defined(__alpha__)
41 #include "arch-alpha.h"
42 #elif defined(__s390x__) || defined(__s390__)
43 #include "arch-s390.h"
44 #elif defined(__sparc__)
45 #include "arch-sparc.h"
46 #elif defined(__sparc64__)
47 #include "arch-sparc64.h"
48 #elif defined(__arm__)
49 #include "arch-arm.h"
50 #elif defined(__mips__) || defined(__mips64__)
51 #include "arch-mips.h"
52 #elif defined(__sh__)
53 #include "arch-sh.h"
54 #elif defined(__hppa__)
55 #include "arch-hppa.h"
56 #else
57 #warning "Unknown architecture, attempting to use generic model."
58 #include "arch-generic.h"
59 #endif
60
61 #ifdef ARCH_HAVE_FFZ
62 #define ffz(bitmask) arch_ffz(bitmask)
63 #else
64 #include "../lib/ffz.h"
65 #endif
66
67 #ifndef ARCH_HAVE_INIT
arch_init(char * envp[])68 static inline int arch_init(char *envp[])
69 {
70 return 0;
71 }
72 #endif
73
74 #endif
75