Linux 3.9-rc4
[linux-2.6/cjktty.git] / arch / alpha / include / asm / special_insns.h
blob88d3452b21f028dcb3b5c7ccef4e6730a38803f0
1 #ifndef __ALPHA_SPECIAL_INSNS_H
2 #define __ALPHA_SPECIAL_INSNS_H
4 enum implver_enum {
5 IMPLVER_EV4,
6 IMPLVER_EV5,
7 IMPLVER_EV6
8 };
10 #ifdef CONFIG_ALPHA_GENERIC
11 #define implver() \
12 ({ unsigned long __implver; \
13 __asm__ ("implver %0" : "=r"(__implver)); \
14 (enum implver_enum) __implver; })
15 #else
16 /* Try to eliminate some dead code. */
17 #ifdef CONFIG_ALPHA_EV4
18 #define implver() IMPLVER_EV4
19 #endif
20 #ifdef CONFIG_ALPHA_EV5
21 #define implver() IMPLVER_EV5
22 #endif
23 #if defined(CONFIG_ALPHA_EV6)
24 #define implver() IMPLVER_EV6
25 #endif
26 #endif
28 enum amask_enum {
29 AMASK_BWX = (1UL << 0),
30 AMASK_FIX = (1UL << 1),
31 AMASK_CIX = (1UL << 2),
32 AMASK_MAX = (1UL << 8),
33 AMASK_PRECISE_TRAP = (1UL << 9),
36 #define amask(mask) \
37 ({ unsigned long __amask, __input = (mask); \
38 __asm__ ("amask %1,%0" : "=r"(__amask) : "rI"(__input)); \
39 __amask; })
41 #endif /* __ALPHA_SPECIAL_INSNS_H */